Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When does Entity get updated?
Message
From
27/07/2010 21:01:13
 
 
To
27/07/2010 20:26:22
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01474174
Message ID:
01474223
Views:
27
>>>>>Check the dataset within the Policy entity to see if the value in there is changed. I think it gets transferred back to the actual entity policies in the SaveEntity() method, which happens after the postback.
>>>>>
>>>>>I could be wrong, as I'm just getting my head around all this too.
>>>>>
>>>>>Eric
>>>>
>>>>The oPolicy.DataSet still has the old value.
>>>
>>>I bet Tim Bryan knows. He *Super Smart* about mm.net! :)
>>>
>>>Eric
>>
>>I'm waiting, Tim ;)
>>
>>For now I've updated the DataSet with the values, but then I need to write the dataset to the session so that it's available after the postback (I think that's the right terminology). It works, but like most things with .NET and MM I am unsure of myself :)
>
>Eric was right, when you call the save, an event is raised the control will respond to and save (bind back) the values to the business object current DataSet. These values are not in your disconnected data necessarily. If you have the object bound to the business object it should bind back when you save it. What does your save code look like?
>
>If you are saving your dataset to a session, make sure you set the DataSet back on the business object before you call the save so the changed values will get bound back when the save occurs.
>Tim

Hi Tim,

just to make sure you understand what I am trying to do:

As the user changes the Sum Assured value, I need to calculate and display the Premium. So in the SumAssured_TextChanged, I passed the oPolicy.Entity.SumAssured value to my oPolicy.CalculatePremium() and assign the return value to the oPolicy.Entity.Premium, but the SumAssured value was the old value, not the newly entered value. Also the correct return value is being put in the Entity.Premium, but when the page loads again the old premium value is back there.

My technique with the DataSet is working (calculations and save work fine), but it just feels like I am not doing the right thing. How should one approach this?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform