Esempio n. 1
0
    public void GetData()
    {//Logging Start
        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
        {
            EmployerBO objEmployerBO = new EmployerBO();

            DataSet ds = objEmployerBO.GetAllInvoice(txtCaseNo.Text, txtCompanyID.Text, "", "", "", "", extddlEmployer.Text, "2");
            grdVisits.DataSource = ds;
            grdVisits.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());
        }
    }
Esempio n. 2
0
    public void GetData()
    {//Logging Start
        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
        {
            EmployerBO objEmployerBO = new EmployerBO();
            string     cases         = "";
            if (txtCaseNo.Text != "")
            {
                string[] spiltcases = txtCaseNo.Text.Trim().Split(',');
                for (int i = 0; i < spiltcases.Length; i++)
                {
                    if (cases == "")
                    {
                        cases = "'" + spiltcases[i].ToString() + "'";
                    }
                    else
                    {
                        cases += ",'" + spiltcases[i].ToString() + "'";
                    }
                }
            }
            DataSet ds = objEmployerBO.GetAllInvoice(cases, txtCompanyID.Text, txtFromDate.Text, txtToDate.Text, txtInvoceFromDate.Text, txtInvoceToDate.Text, extddlEmployer.Text, rdlstType.Text);
            grdVisits.DataSource = ds;
            grdVisits.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());
        }
    }