Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UI or BO code?
Message
 
To
26/08/2010 13:30:22
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01478134
Message ID:
01478676
Views:
22
>>Well, usually Tim is the one helping me out but I'm going to take a stab at this. I hope this helps.
>>
>>
>> public PolicyEntity GetPolicyByPolicyPK(Guid policyPK)
>>       {
>>           
>>            // get the requested entity - leave on the business object for return in the event we need it.
>>            this.GetEntity("PoliciesSelectByPK",
>>                            this.CreateParameter("@PolicyPK", policyPK));
>>
>>            // check its status
>>            if (oPolicyEntity.StatusFK != (int)StatusCode.Pending)
>>            {
>>                // if it is not Pending then get this entity into a local reference. 
>>                PolicyEntity oOldPolicyEntity = this.GetEntity("PoliciesSelectByPK",
>>                            this.CreateParameter("@PolicyPK", policyPK));
>>                //Get an empty dataset and add a new row
>>                this.GetEmptyDataSet();
>>                this.NewRow(this.GetCurrentDataSet());
>>                //CopyPolicyEntity(oOldPolicyEntity, this.Entity);
>>            }
>>            // This will return either the original or the newly created one that is added.
>>           return this.Entity;
>>}
>>
>
>Hi Linda,
>
>could you explain a couple things in your code, please?
>
>What's the reason for oOldPolicyEntity?
>
>I guess after adding the newrow I then need to populate it with the values from the old entity or dataset?

You're exactly right. I notice that Tim got you another solution, though. Good luck.
Linda Harmes
HiBit Technologies, Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform