Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Processing Selected Items
Message
De
15/06/2010 16:36:03
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01468999
Message ID:
01469052
Vues:
37
Hi Bob,

Pretty much exactly like that. :-)
Tim

>Frank,
>
>The SaveEntity method is in the main BO not the Entity BO. I would expect you should have something like this:
>
>
>Policy oPolicy = new Policy();
>oPolicy.GetPolicyByPolicyPK(policyPK);
>oPolicy.Entity.IssueDate = issueDate;
>oPolicy.Entity.IssueDate = DateTime.Now;
>oPolicy.SaveEntity();
>
>
>
>or just change
>
>oPolicyEntity.SaveEntity() to
>
>this.SaveEntity()
>
>
>>Thanks Bob,
>>
>>maybe I should try to explain things more fully.
>>
>>I have a page where the user can enter search criteria and a list of Policies get returned. This page has an oPolicy (BO) defined as type Policy.
>>
>>I have some code that works for deleting selected Policies from the list:
>>
>>
                // retrieve session dataset
>>                DataSet dsStatus = (DataSet)Session["Policy"];
>>
>>                // loop through grid's rows and delete the selected items
>>                foreach (GridViewRow row in this.grdList.Rows)
>>                {
>>                    CheckBox cb = (CheckBox)(row.FindControl("chkSelector"));
>>                    if (cb != null && cb.Checked)
>>                    {
>>                        // delete the row
>>                        isSelected = true;
>>                        Guid policyPK = new Guid(this.grdList.DataKeys[row.RowIndex].Value.ToString());
>>
>>                        this.oPolicy.Delete(policyPK);
>>                    }
>>                }
>>
>>
>>So I want to do something similar but call the "Issue" method of oPolicy. How should I code the Issue method?
>>
>>This is what I am trying:
>>
>>
        public void Issue(Guid policyPK, DateTime issueDate)
>>        {
>>            PolicyEntity oPolicyEntity = this.GetPolicyByPolicyPK(policyPK);
>>            oPolicyEntity.IssueDate = issueDate;
>>            oPolicyEntity.IssueDate = DateTime.Now;
>>            oPolicyEntity.SaveEntity();
>>           
>>        }
>>
>>but I get an error:
>>
>>'SamaanSystems.IAS.Business.PolicyEntity' does not contain a definition for 'SaveEntity' and no extension method 'SaveEntity' accepting a first argument of type 'SamaanSystems.IAS.Business.PolicyEntity' could be found (are you missing a using directive or an assembly reference?)
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform