Ejemplo n.º 1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            DataTable dtResponse = new DataTable();
            dtResponse = objBLLIndx.VET_Ins_Response(UDFLib.ConvertToInteger(ViewState["Observation_ID"].ToString()), txtResponse.Text.Trim(), Convert.ToInt32(GetSessionUserID()));
            if (dtResponse.Rows.Count > 0)
            {
                hdnResponseId.Value    = dtResponse.Rows[0]["Response_ID"].ToString();
                Session["Response_ID"] = hdnResponseId.Value;

                string jsSqlError2 = "alert('Response saved successfully.');";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "jsSqlError2", jsSqlError2, true);
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
            string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
        }
    }