コード例 #1
0
    void LoadPoliciesForFacturing(int insuranceCompanyID)
    {
        GridView           gvNewPolicies   = (GridView)DetailsView1.FindControl("gvNewPolicies");
        List <PolicyItem>  newPiList       = PolicyItem.GetNonIncomeFactured(insuranceCompanyID);
        List <FactureInfo> newFactureInfos = new List <FactureInfo>();

        foreach (PolicyItem pi in newPiList)
        {
            FactureInfo fi = new FactureInfo();
            fi.ID             = pi.ID;
            fi.IsForFacturing = true;
            fi.PolicyNumber   = pi.PolicyNumber;
            newFactureInfos.Add(fi);
        }
        listFactureInfos         = newFactureInfos;
        gvNewPolicies.DataSource = newFactureInfos;
        gvNewPolicies.DataBind();
    }