Exemple #1
0
    public void BindGrid()
    {
        DataSet dset;

        try
        {
            string hdnBills = hdnBillNumber.Value.ToString();
            Bill_Sys_BillTransaction_BO n_bo     = new Bill_Sys_BillTransaction_BO();
            string[]                 sBillNumber = System.Text.RegularExpressions.Regex.Split(hdnBills, @"\,");
            gbmodel.bill.Bill        billNo      = new gbmodel.bill.Bill();
            List <gbmodel.bill.Bill> lstBills    = new List <gbmodel.bill.Bill>();
            for (int i = 0; i < sBillNumber.Length; i++)
            {
                billNo = new gbmodel.bill.Bill();
                if (sBillNumber.Length > 0)
                {
                    if (sBillNumber[i] != "")
                    {
                        billNo.Number = sBillNumber[i].ToString();
                        lstBills.Add(billNo);
                    }
                }
            }

            DataTable dtBillNumbers = new DataTable();
            dtBillNumbers.Columns.Add("sz_bill_id", typeof(string));
            dtBillNumbers.Columns.Add("sz_assigned_lawfirm_id", typeof(string));
            dtBillNumbers.Columns.Add("sz_company_id", typeof(string));

            foreach (gbmodel.bill.Bill sBill in lstBills)
            {
                DataRow row = dtBillNumbers.NewRow();
                row["sz_bill_id"] = sBill.Number;
                dtBillNumbers.Rows.Add(row);
            }

            gbmodel.account.Account oAccount = new gbmodel.account.Account();
            oAccount.ID = ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;

            SrvBill srvBill = new SrvBill();
            dset = new DataSet();
            //dset = srvBill.GetBilVerificationlDetails(dtBillNumbers, lstBills, oAccount);
            dset = n_bo.GetBilEORDetails(dtBillNumbers, oAccount.ID.ToString());
            grdEORReceived.DataSource = dset.Tables[0];
            grdEORReceived.DataBind();
        }
        catch (Exception ex)
        {
            lblScan.Visible         = false;
            lblMessage.Visible      = false;
            lblErrorMessage.Visible = true;
            lblErrorMessage.Text    = ex.Message.ToString();
        }
    }