Click here to Skip to main content
16,005,149 members
Home / Discussions / C#
   

C#

 
GeneralRe: Addition Pin
David Stone3-Oct-04 19:28
sitebuilderDavid Stone3-Oct-04 19:28 
GeneralRe: Addition Pin
benjymous3-Oct-04 22:19
benjymous3-Oct-04 22:19 
GeneralRe: Addition Pin
Nnamdi Onyeyiri4-Oct-04 1:23
Nnamdi Onyeyiri4-Oct-04 1:23 
GeneralRe: Addition Pin
benjymous4-Oct-04 1:31
benjymous4-Oct-04 1:31 
GeneralRe: Addition Pin
David Stone4-Oct-04 4:54
sitebuilderDavid Stone4-Oct-04 4:54 
GeneralDesign Question - Business Object Layer and Data Access Pin
matthias s.3-Oct-04 12:38
matthias s.3-Oct-04 12:38 
GeneralRe: Design Question - Business Object Layer and Data Access Pin
sreejith ss nair3-Oct-04 20:06
sreejith ss nair3-Oct-04 20:06 
GeneralRe: Design Question - Business Object Layer and Data Access Pin
hatim_ali3-Oct-04 20:07
hatim_ali3-Oct-04 20:07 
You Wrote:
The problem I see with this approach is the following. Say my MDI GUI displays a list of all Companies in a TreeView on the lefthandside. On DoubleClick the selected BusinessObject gets displayed in a new "Document Window" which hosts a PropertyGrid control. Now my user opens 3 Companies and changes the data of all of them. How would I then handle the situation when he only wants to save to of those documents?

In My Opinion:
Save one on one basis that is "Save" can be done on open screens only. When your application user double clicks the company tree view a "document window" with company details with a save button will be presented to user. If the user want to persist the chages, he'll hit save and your code will invoke save inteface on the business object. This will save you scanning all objects in collection and will also save you from maintining that which objects have been changed.

Some other suggestions:
Creating objects for all companies may not be an optimal idea. Only fetch company names and Identification info (IDs) from database and render it to tree view. Obviously these objects will be lightweight as no company info is fetched. Now, if your app user selects a company, create a Object of Class Company with all the company details and render it to user.

hope it helps,
Hatim Ali.
GeneralRe: Design Question - Business Object Layer and Data Access Pin
Serge Lobko-Lobanovsky4-Oct-04 1:07
Serge Lobko-Lobanovsky4-Oct-04 1:07 
GeneralReading word document whit C# Pin
evalle5053-Oct-04 12:35
evalle5053-Oct-04 12:35 
GeneralRe: Reading word document whit C# Pin
sreejith ss nair3-Oct-04 20:54
sreejith ss nair3-Oct-04 20:54 
GeneralRe: Reading word document whit C# Pin
Anonymous4-Oct-04 5:00
Anonymous4-Oct-04 5:00 
GeneralDrawing outside of your Form!! Pin
RichiLloyd3-Oct-04 10:33
RichiLloyd3-Oct-04 10:33 
GeneralRe: Drawing outside of your Form!! Pin
benjymous4-Oct-04 2:07
benjymous4-Oct-04 2:07 
GeneralPassing databaseName to crystal report Pin
amgad_fathy3-Oct-04 8:52
amgad_fathy3-Oct-04 8:52 
GeneralRe: Passing databaseName to crystal report Pin
Heath Stewart3-Oct-04 9:18
protectorHeath Stewart3-Oct-04 9:18 
GeneralDataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name REPORTTO Pin
macsgirl3-Oct-04 8:45
macsgirl3-Oct-04 8:45 
GeneralRe: DataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name REPORTTO Pin
Heath Stewart3-Oct-04 9:14
protectorHeath Stewart3-Oct-04 9:14 
GeneralAvoiding Win32 dependancy Pin
Andres Coder3-Oct-04 6:03
Andres Coder3-Oct-04 6:03 
GeneralRe: Avoiding Win32 dependancy Pin
Heath Stewart3-Oct-04 9:13
protectorHeath Stewart3-Oct-04 9:13 
Generalregex question Pin
g00fyman3-Oct-04 3:13
g00fyman3-Oct-04 3:13 
GeneralRe: regex question Pin
Not Active3-Oct-04 5:20
mentorNot Active3-Oct-04 5:20 
Generalcharacter escaping problem Pin
sween33-Oct-04 3:10
sween33-Oct-04 3:10 
GeneralRe: character escaping problem Pin
Stefan Troschuetz3-Oct-04 3:57
Stefan Troschuetz3-Oct-04 3:57 
GeneralRe: character escaping problem Pin
sween24-Oct-04 2:25
sween24-Oct-04 2:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.