Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UI or BO code?
Message
De
25/08/2010 13:48:52
 
 
À
25/08/2010 11:56:44
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
01478134
Message ID:
01478425
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform