business object resets to initial values on Validation error

business object resets to initial values on Validation error

Old forum URL: forums.lhotka.net/forums/t/1046.aspx


kasvis posted on Monday, August 28, 2006

I am having trouble with a business object.
When i enter an invalid value then the object resets to the initial values. I loose all the information i entered earlier.
I am not sure what causing this. Has anyone else experienced this problem.
Thanks

xal replied on Monday, August 28, 2006

Maybe you have a try/catch that calls canceledit?
If not, can you post your property? your validation rule? your binding code?

Andrés

skagen00 replied on Monday, August 28, 2006

Hi, are you using ASP.Net with one of the data controls in InsertMode?

kasvis replied on Monday, August 28, 2006

Its windows application. I am actually using 4 different objects in the form. Is it possible that somehow that is causing the problem.
this is part of the code from the form Load
 _reservation = Reservation .NewReservation ();

_reservation.Processer = Csla.ApplicationContext.User.Identity.Name;
reservationBindingSource.DataSource = _reservation ;
                   
chargeBkBindingSource.DataSource = _project .ChargeBk;

_reqBy = Requester.NewRequester();

RequestedBybindingSource.DataSource = _reqBy;
_reqFor = Requester.NewRequester();

requesterBindingSource.DataSource = _reqFor;
_BO = BudgetOfficer.NewBudgetOfficer();

budgetOfficerBindingSource.DataSource = _BO;


Also previously i had noted the the objects only resets on validation errors. But it appears to change if i change values while creating a new record

Thanks

Copyright (c) Marimer LLC