Example #1
0
    void BindPolForClient(int clientID)
    {
        DateTime           startDate       = DateTime.Parse(tbStartDate.Text);
        DateTime           endDate         = DateTime.Parse(tbEndDate.Text);
        List <PolicyItem>  lstPolPerClient = PolicyItem.GetForGroupFactures(startDate, endDate, clientID);
        List <FactureInfo> lstFacInfo      = new List <FactureInfo>();

        foreach (PolicyItem pi in lstPolPerClient)
        {
            FactureInfo fi = new FactureInfo();
            fi.ID             = pi.ID;
            fi.PolicyNumber   = pi.PolicyNumber;
            fi.IsForFacturing = true;
            fi.PremiumValue   = pi.PremiumValue;
            lstFacInfo.Add(fi);
        }
        listNewFactureInfos      = lstFacInfo;
        gvNewPolicies.DataSource = lstFacInfo;
        gvNewPolicies.DataBind();
    }