コード例 #1
0
    private void bindLawFirmList()
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        Bill_Sys_Transfer_Report billSysTransferReport = new Bill_Sys_Transfer_Report();

        try
        {
            DataSet dataSet = new DataSet();
            dataSet = billSysTransferReport.getLawfirmList(this.txtCompanyID.Text);
            this.grdLawFirm.DataSource = dataSet;
            this.grdLawFirm.DataBind();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
コード例 #2
0
    public void BindGrid()
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            string str = "";
            for (int i = 0; i < this.grdLawFirm.VisibleRowCount; i++)
            {
                GridViewDataColumn item     = (GridViewDataColumn)this.grdLawFirm.Columns[0];
                CheckBox           checkBox = (CheckBox)this.grdLawFirm.FindRowCellTemplateControl(i, item, "chkall1");
                if (checkBox != null && checkBox.Checked)
                {
                    ASPxGridView aSPxGridView = this.grdLawFirm;
                    string[]     strArrays    = new string[] { "CODE" };
                    string       str1         = aSPxGridView.GetRowValues(i, strArrays).ToString();
                    str = string.Concat(str, ",", str1);
                }
            }
            if (str != "")
            {
                str = str.Remove(0, 1);
            }
            string str2 = this.txtFromDate.Text.ToString();
            string str3 = this.txtToDate.Text.ToString();
            Bill_Sys_Transfer_Report billSysTransferReport = new Bill_Sys_Transfer_Report();
            DataSet dataSet = new DataSet();
            dataSet = billSysTransferReport.getTransferedCaseDetail(this.txtCompanyID.Text, str, str2, str3);
            this.grdTransfer.DataSource = dataSet;
            this.grdTransfer.DataBind();
            this.Session["TransferGridData"] = dataSet;
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }