Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UI or BO code?
Message
From
25/08/2010 13:48:52
 
 
To
25/08/2010 11:56:44
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01478134
Message ID:
01478425
Views:
23
>Hi Frank,
>
>Yes, that is what I meant and I see no reason what you did wouldn't work fine.
>Tim
>

Hi Tim,

I've been trying this out and am getting a bit lost.

My UI code is this:
this.oPolicy.GetPolicyByPolicyPK(this.PolicyPK);
The code in my BO is this:
        public PolicyEntity GetPolicyByPolicyPK(Guid policyPK)
        {
            //return this.GetEntity("PoliciesSelectByPK",
            //    this.CreateParameter("@PolicyPK", policyPK));
            
            // get the requested entity
            PolicyEntity oPolicyEntity = this.GetEntity("PoliciesSelectByPK",
                            this.CreateParameter("@PolicyPK", policyPK));
            // check its status
            if (oPolicyEntity.StatusFK != (int)StatusCode.Pending)
            {
                // if it is not Pending then create a new entity, copy the data from the original entity 
                PolicyEntity oNewPolicyEntity = new PolicyEntity();
                //CopyPolicyEntity(oPolicyEntity, oNewPolicyEntity);

                // return the new entity
                return oNewPolicyEntity;
            }
            else
                return oPolicyEntity;
        }
Stepping through the code shows me that oNewPolicyEntity is getting returned. This has no values set in it (I have not done the code to copy anything yet), yet when I return to the UI my oPolicy has the values for the original policy. This actually brings me to one of the confusions I have. In VFP I would have to store the return value somewhere, but this code does not store the returned PolicyEntity anywhere, so how does the this.oPolicy.Entity get populated with the data and why isn't it showing the new/blank policy data?
Frank.

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

Click here to load this message in the networking platform