コード例 #1
0
    private void BindGrid()
    {
        _reportBO = new Bill_Sys_ReportBO();
        try
        {
            if (extddlLocation.Visible == true && extddlLocation.Text != "NA")
            {
                grdAllReports.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_UNBILLED_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text, extddlLocation.Text);
                grdAllReports.DataBind();

                grdForReport.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_UNBILLED_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text, extddlLocation.Text);
                grdForReport.DataBind();
            }
            else
            {
                grdAllReports.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_UNBILLED_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text);
                grdAllReports.DataBind();

                grdForReport.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_UNBILLED_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text);
                grdForReport.DataBind();
            }
        }
        catch (Exception ex)
        {
            string strError = ex.Message.ToString();
            strError = strError.Replace("\n", " ");
            Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + strError);
        }
    }
コード例 #2
0
    private 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());
        }
        _reportBO = new Bill_Sys_ReportBO();
        try
        {
            if (extddlLocation.Visible == true && extddlLocation.Text != "NA")
            {
                grdAllReports.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_PATIENT_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text, extddlLocation.Text);
                grdAllReports.DataBind();

                grdForReport.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_PATIENT_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text, extddlLocation.Text);
                grdForReport.DataBind();
            }
            else
            {
                grdAllReports.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_PATIENT_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text);
                grdAllReports.DataBind();

                grdForReport.DataSource = _reportBO.GetAllReports("SP_REPORT_GET_PATIENT_PROCEDURES", txtFromDate.Text, txtToDate.Text, txtCompanyID.Text);
                grdForReport.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());
        }
    }