Example #1
0
 protected void btnSaveCommand_Click(object sender, EventArgs e)
 {
     try
     {
         int Res = BLL_QMSDB_Procedures.QMSDBProcedures_InsertWithSection(txtProcedureCode.Text, txtProcedureName.Text, UDFLib.ConvertToInteger(ddlFolderName.SelectedValue), FileWateMark.Checked == true ? 1 : 0, UDFLib.ConvertIntegerToNull(ddlHeaderTemplate.SelectedValue), UDFLib.ConvertIntegerToNull(ddlFooterTemlate.SelectedValue), UDFLib.ConvertToInteger(Session["USERID"]), "");
         if (Res > 0)
         {
             string js = "alert('Query Saved !!'); hideModal('dvSaveCommand');";
             ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
         }
     }
     catch (Exception ex)
     {
         string js = "alert('" + ex.Message.Replace("'", "") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "script2", js, true);
     }
 }
Example #2
0
    protected void btnSaveCommand_Click(object sender, EventArgs e)
    {
        try
        {
            int PROCEDURE_ID = BLL_QMSDB_Procedures.QMSDBProcedures_InsertWithSection(txtProcedureCode.Text, txtProcedureName.Text, UDFLib.ConvertToInteger(ddlFolderName.SelectedValue), FileWateMark.Checked == true ? 1 : 0, UDFLib.ConvertIntegerToNull(ddlHeaderTemplate.SelectedValue), UDFLib.ConvertIntegerToNull(ddlFooterTemlate.SelectedValue), UDFLib.ConvertToInteger(Session["USERID"]), "");
            if (PROCEDURE_ID > 0)
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "reloadparent", "parent.RealoadParent();", true);
                ResponseHelper.Redirect("ProcedureBuilder.aspx?PROCEDURE_ID=" + PROCEDURE_ID.ToString(), "blank", "");
            }
        }

        catch (Exception ex)
        {
            string js = "alert('" + ex.Message.Replace("'", "") + "');";
            Page.ClientScript.RegisterStartupScript(GetType(), "script", js, true);
        }
    }