private void CalculateAmount(string id) { string Elmahid = string.Format("ElmahId: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url); using (Utils utility = new Utils()) { utility.MethodStart(Elmahid, System.Reflection.MethodBase.GetCurrentMethod()); } _bill_Sys_Menu = new Bill_Sys_Menu(); decimal amount; try { amount = _bill_Sys_Menu.GetICcodeAmount(id); txtAmount.Text = Convert.ToDecimal(amount * Convert.ToDecimal(txtUnit.Text)).ToString(); } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); using (Utils utility = new Utils()) { utility.MethodEnd(Elmahid, System.Reflection.MethodBase.GetCurrentMethod()); } string str2 = "Error Request=" + Elmahid + ".Please share with Technical support."; base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2); } //Method End using (Utils utility = new Utils()) { utility.MethodEnd(Elmahid, System.Reflection.MethodBase.GetCurrentMethod()); } }
protected void extddlIC9Code_extendDropDown_SelectedIndexChanged(object sender, EventArgs e) { 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()); } _bill_Sys_Menu = new Bill_Sys_Menu(); try { if (txtUnit.Text != "") { CalculateAmount(extddlIC9Code.Text.ToString()); } else { txtAmount.Text = _bill_Sys_Menu.GetICcodeAmount(extddlIC9Code.Text.ToString()).ToString(); txtTempAmt.Value = _bill_Sys_Menu.GetICcodeAmount(extddlIC9Code.Text.ToString()).ToString(); } } 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()); } }