Esempio n. 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            RequestData data = new RequestData();

            data.RequestID   = txtRequestId.Text;
            data.Subject     = txtSubject.Text;
            data.Description = txtDescription.Text;
            data.Note        = txtNote.Text;
            data.Status      = "Reject";

            RequestDAL dal = new RequestDAL();

            #region update request table

            bool check_request = dal.RequestUpdate(data);

            #endregion

            #region update request_reject table

            bool check_request_reject = dal.RequestRejectInsert(data);

            #endregion

            if (check_request == true && check_request_reject == true)
            {
                this.Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "myscript", "Message_Show('Save_success')", true);

                string username = HiddenField1.Value;

                DisplayRequest(username);
            }
            else
            {
                this.Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "myscript", "Message_Show('Error')", true);
            }
        }