コード例 #1
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            sz_speciality = Session["PR_SZ_PROCEDURE_GROUP"].ToString();
            DataSet           dset          = new DataSet();
            Bill_Sys_ReportBO _objReportBO  = new Bill_Sys_ReportBO();
            if (Session["Case_Type"] == null || Session["Case_Type"] == "")
            {
                if ((((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]).SZ_LOCATION == "1") && Session["Location_Id"] != "")
                {
                    dset = _objReportBO.GetReportByReport(txtCompanyID.Text, sz_speciality, Session["Location_Id"].ToString());
                }
                else
                {
                    dset = _objReportBO.GetReportByReport(txtCompanyID.Text, sz_speciality);
                }
            }
            if (Session["Case_Type"] != null && Session["Case_Type"] != "")
            {
                Bill_Sys_ReportBO objCaseType = new Bill_Sys_ReportBO();
                ArrayList         arrlst      = new ArrayList();
                arrlst.Add(txtCompanyID.Text);
                arrlst.Add(sz_speciality);
                arrlst.Add(Session["Location_Id"].ToString());
                arrlst.Add(Session["Case_Type"].ToString());
                //DataSet dsCaseType = new DataSet();
                dset = objCaseType.GetCaseTypeReport(arrlst);
            }

            grdPayment.DataSource = dset.Tables[0];
            grdPayment.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());
        }
    }