コード例 #1
0
ファイル: BrokerageSlips.aspx.cs プロジェクト: yonass/ASUC2
    protected void btnCheck_Click(object sender, EventArgs e)
    {
        DateTime                  fromDate = DateTime.Parse(tbFromDate.Text);
        DateTime                  toDate   = DateTime.Parse(tbToDate.Text);
        List <PolicyItem>         pList    = PolicyItem.GetNonBrokerageSliped(Convert.ToInt32(ddlInsuranceCompanies.SelectedValue), fromDate, toDate);
        List <PolicyForSlipsInfo> fInfos   = new List <PolicyForSlipsInfo>();

        foreach (PolicyItem pi in pList)
        {
            PolicyForSlipsInfo pfsi = new PolicyForSlipsInfo();
            pfsi.ID                 = pi.ID;
            pfsi.BrokerageID        = pi.BrokerageID;
            pfsi.PacketBrokerageID  = pi.PacketBrokerageID;
            pfsi.InsuranceSubTypeID = pi.InsuranceSubTypeID;
            pfsi.IsForFacturing     = true;
            pfsi.PolicyNumber       = pi.PolicyNumber;
            fInfos.Add(pfsi);
        }
        listPolicyForSlipsInfos  = fInfos;
        gvNewPolicies.DataSource = fInfos;
        gvNewPolicies.DataBind();
    }