protected void btnDelete_Click(object sender, EventArgs e) {//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 { string Id = grdCompany.Items[0].Cells[1].Text; objBillingCompanyDetails = new Bill_Sys_BillingCompanyDetails_BO(); ArrayList arrSelect = new ArrayList(); arrSelect.Add(Id); arrSelect.Add(txtCompanyID.Text); arrSelect.Add("DELETE"); int icnt = objBillingCompanyDetails.DeleteJFKBilligCompany(arrSelect); if (icnt > 0) { usrMessage.PutMessage("record deleted successfully"); usrMessage.SetMessageType(UserControl_ErrorMessageControl.DisplayType.Type_UserMessage); usrMessage.Show(); } BindData(); } 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()); } }