Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I detect the decimal separator of the current host? PinPopular
DaveyM6917-Jun-08 0:44
professionalDaveyM6917-Jun-08 0:44 
Questionpass by value Pin
DaveyM6917-Jun-08 0:16
professionalDaveyM6917-Jun-08 0:16 
AnswerRe: pass by value Pin
Simon P Stevens17-Jun-08 0:40
Simon P Stevens17-Jun-08 0:40 
GeneralRe: pass by value Pin
Guffa17-Jun-08 0:50
Guffa17-Jun-08 0:50 
GeneralRe: pass by value Pin
Simon P Stevens17-Jun-08 1:07
Simon P Stevens17-Jun-08 1:07 
GeneralRe: pass by value Pin
Guffa17-Jun-08 3:21
Guffa17-Jun-08 3:21 
GeneralRe: pass by value Pin
DaveyM6917-Jun-08 0:55
professionalDaveyM6917-Jun-08 0:55 
GeneralRe: pass by value Pin
Simon P Stevens17-Jun-08 1:19
Simon P Stevens17-Jun-08 1:19 
It sounds like your talking about some kind of transactionalised editing.

I.e, you pass the collection of objects to a form, allow the user to edit and make changes, but if they click cancel you want to roll back the changes, but if they click ok, you commit the changes to the objects.

Several options.
1) Just make the changes on the objects immediatly, but if the criteria occurs that requires a cancel, reload the objects from their original source (i.e. the database)
2) Take a copy of the objects, make the changes on the copies, only commit the changes to the main objects when the criteria occurs that requires a commit. (Sounds pretty much like what you are doing already with the structs)
3) Take a copy, make the changes on the original, restore the originals from the copies if a rollback is required.
4) Record all changes to the object, if a rollback is required, reverse the changes one by one.(kind of like an undo button)

Simon

AnswerRe: pass by value Pin
RugbyLeague17-Jun-08 0:48
RugbyLeague17-Jun-08 0:48 
GeneralRe: pass by value Pin
DaveyM6917-Jun-08 0:58
professionalDaveyM6917-Jun-08 0:58 
GeneralRe: pass by value Pin
RugbyLeague17-Jun-08 1:00
RugbyLeague17-Jun-08 1:00 
AnswerRe: pass by value Pin
N a v a n e e t h17-Jun-08 0:49
N a v a n e e t h17-Jun-08 0:49 
GeneralRe: pass by value Pin
DaveyM6917-Jun-08 0:59
professionalDaveyM6917-Jun-08 0:59 
AnswerRe: pass by value Pin
CPallini17-Jun-08 0:50
mveCPallini17-Jun-08 0:50 
GeneralRe: pass by value Pin
DaveyM6917-Jun-08 1:00
professionalDaveyM6917-Jun-08 1:00 
GeneralRe: pass by value Pin
Guffa17-Jun-08 1:08
Guffa17-Jun-08 1:08 
GeneralRe: pass by value Pin
Christian Flutcher17-Jun-08 1:31
Christian Flutcher17-Jun-08 1:31 
GeneralRe: pass by value Pin
Simon P Stevens17-Jun-08 1:37
Simon P Stevens17-Jun-08 1:37 
AnswerRe: pass by value Pin
V.17-Jun-08 2:50
professionalV.17-Jun-08 2:50 
GeneralRe: pass by value Pin
Simon P Stevens17-Jun-08 3:06
Simon P Stevens17-Jun-08 3:06 
GeneralRe: pass by value Pin
V.17-Jun-08 4:13
professionalV.17-Jun-08 4:13 
QuestionTao problem Pin
Ranger4916-Jun-08 23:47
Ranger4916-Jun-08 23:47 
AnswerRe: Tao problem Pin
Alan Balkany17-Jun-08 4:12
Alan Balkany17-Jun-08 4:12 
GeneralRe: Tao problem Pin
Ranger4917-Jun-08 5:08
Ranger4917-Jun-08 5:08 
GeneralRe: Tao problem Pin
Alan Balkany17-Jun-08 5:11
Alan Balkany17-Jun-08 5:11 

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.