all groups > dotnet windows forms databinding > june 2006 >
You're in the

dotnet windows forms databinding

group:

Workflow question for a form with multiple levels of data



Workflow question for a form with multiple levels of data DEWright_CA NO[at]SPAM online.nospam
6/15/2006 12:36:02 PM
dotnet windows forms databinding: Ok, I am doing this in DotNet 2.0 and am trying to workout the workflow and
process of this.

I have a form with a section for me data header, 4 fields. I have a
subsection that is a relationship, 8 fields and a many-one relationship. I
have a second subsection that has 4 fields and a many-one relationship. My
third section has 8 fields and is a one-one relationship.

I have the MSFT Binding Navigator and Binding source setup to the dataheader
table. I have created my own binding sections for the 2 many-one subforms.

What I am having trouble sorting out is the workflow and dataflow of
creating a new record in the header, then the subsections and saving them all.

Does anyone have a suggested workflow or a reference online someplace that
might step through a use case like this?
--
RE: Workflow question for a form with multiple levels of data v-lliu NO[at]SPAM online.microsoft.com
6/16/2006 12:00:00 AM
Hi,

Thank you for posting.

From your post, my understanding on this issue is that you have four
tables(e.g. TableA-with 4 fields,TableB-with 8 fields,TableC-with 4 fields
and TableD-with 8 fields) in your project. TableA has a one-many
relationship with TableB and TableC. TableA has a one-one relationship with
TableD. You want to know the workflow of creating a new record in TableA
and then corresponding records in TableB and TableC. If I'm off base,
please don't hesitate to let me know.

I think you could show a record of TableA in some controls such as TextBox,
Comobox etc once a time on the form and show the corresponding records of
TableB and TableC in two DataGridViews respectively. When you navigate the
records in TableA, the values in these controls will change and
corresponding records in the two DataGridViews will change as well. The
workflow of creating a new record in TableA and then corresponding records
in TableB and TableC may be like below.

1. Create a new record in TableA
a. Click on a "Add New Record in TableA" button.
b. Clear the values in those controls.
c. Clear the content in the two DataGridViews.
d. Fill in these controls the new record fields' values.
e. Click on a "Save Record in TableA" button to save the new record.

2. Create records in TableB
a. Click on a "Add New Record in TableB" button.
b. Popup a new Windows form to add a new record in TableB.
c. Fill the new record fields' values in the new Windows form.
d. Click on a "Save" button in this Windows form to save this new
record in TableB.
e. Close the new Windows form and add the new record in the
DataGridView for TableB.

The workflow of creating records in TableC is similar to that of TableB.

If there's anything unclear, please don't hesitate to get in touch.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
RE: Workflow question for a form with multiple levels of data DEWright_CA NO[at]SPAM online.nospam
6/19/2006 1:33:02 PM
Ok, I can see how that goes.

Now my last question would go to table D? Where there is the 1-1
relationship and no binding navigator control.

In this area of my form the user is just presented with 8+ fields to enter
if the form is active. I have this set based on another variable, but I am
kind of lost at the best way to save this recordset to the database. In table
b-c I have navigator controls that are analgous to using a save button, but
section D isn't really that way.

Thoughts?

Thanks for your thoughts Linda!

David
--
D @ premierdata


[quoted text, click to view]
RE: Workflow question for a form with multiple levels of data v-lliu NO[at]SPAM online.microsoft.com
6/20/2006 12:00:00 AM
Hi David,

Thanks for your update and response.

I think you could show a record of TableD in some controls such as TextBox,
ComboBox etc once a time on the form just like TableA. When you navigate
the records in TableA, if there's the corresponding record in TableD, the
corresponding record is displayed in these controls of TableD. Otherwise,
these controls display a blank record.

The workflow of creating a new record in TableA and TableD may be like
below:

1. Create a new record in TableA
a. Click on a "Add New Record in TableA" button.
b. Clear the values in those controls of TableA.
c. Clear the content in the two DataGridViews.
d. Clear the values in those controls of TableD.
e. Fill in these controls of TableA the new record fields' values.
f. Click on a "Save Record in TableA" button to save the new record.

2. Create a new record in TableD
a. Click on a "Add New Record in TableD" button(this button is enabled
only if there's no the corresponding record in TableD).
b. Set these controls of TableD to be editable(set ReadOnly property to
false or Enabled property to true).
c. Fill in these controls of TableD the new record fields' values.
d. Click on a "Save Record in TableD" button to save the new record.

Hope this helps.

If you have anything unclear, please don't hesitate to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================
AddThis Social Bookmark Button