//private bool ValidateControl() //{ // bool val = true; // try // { // if (txtDescription.Text == "") // { // val = false; // throw new Exception("Enter description."); // } // } // catch (Exception ex) // { // string script = "function f(){alert('" + ex.Message.ToString() + "');"; // ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true); // } // return val; //} protected void OnDeleteRegionalApproverAction_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(hfRegionalApproverActionID.Value)) // delete if an existing record { SQMModelMgr.DeleteINCFORMREGIONALAPPROVERLIST(new PSsqmEntities(), Convert.ToDecimal(hfRegionalApproverActionID.Value)); hfRegionalApproverActionID.Value = ""; if (OnRegionalApproverActionCommand != null) { OnRegionalApproverActionCommand("delete"); } } }