protected void btndeletepop_Click(object sender, EventArgs e) { try { InventoryServiceClient lclsService = new InventoryServiceClient(); string lstrMessage = lclsService.DeleteItem(Convert.ToInt64(hdnitemid.Value), false, defaultPage.UserId); if (lstrMessage == "Deleted Successfully") { BindItem(); EventLogger log = new EventLogger(config); string msg = Constant.MedicalSuppliesDeleteMessage.Replace("ShowdelPopup('", "").Replace("<<Itemname>>", hdnitemname.Value).Replace("');", ""); log.LogInformation(msg); ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.MedicalSuppliesDeleteMessage.Replace("<<Itemname>>", hdnitemname.Value), true); } } catch (Exception ex) { EventLogger log = new EventLogger(config); log.LogException(ex); ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Constant.MedicalSuppliesErrorMessage.Replace("<<Itemname>>", ex.Message.ToString()), true); } }