Beispiel #1
0
    public void BindData()
    {//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
        {
            objBillingCompanyDetails = new Bill_Sys_BillingCompanyDetails_BO();
            DataSet   dsVlaues  = new DataSet();
            ArrayList arrSelect = new ArrayList();
            arrSelect.Add(txtCompanyID.Text);
            arrSelect.Add("LIST");
            dsVlaues = objBillingCompanyDetails.SelectJFKBilligCompany(arrSelect);
            grdCompany.DataSource = dsVlaues;
            grdCompany.DataBind();
            if (grdCompany.Items.Count > 0)
            {
                btnSave.Enabled = false;
            }
            else
            {
                btnSave.Enabled = true;
            }
        }
        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());
        }
    }