Exemplo n.º 1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (ValidateRecord())
            {
                ENTREQREQUESTS rqst = new ENTREQREQUESTS();
                rqst.ID            = Guid.NewGuid();
                rqst.NAME          = txtRequestName.Text;
                rqst.DESCRIPTION   = txtDescription.Text;
                rqst.USERID        = ONLINEUSER.ID;
                rqst.PROJECTID     = Guid.Parse(drpProjectName.SelectedValue);
                rqst.REQUESTDATE   = DateTime.Now;
                rqst.TYPEREQUESTID = 1;
                DALRequest.InsertTable(rqst);

                Response.Redirect("/Req/REQRequests.aspx");
            }
        }
 protected void drpRequestStatusName_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (drpRequestStatusName.SelectedValue == "2")
     {
         ENTREQREQUESTS rqst = DALRequest.GetValueStatus(Guid.Parse(Request.QueryString["ID"]));
         rqst.TYPEREQUESTID = 2;
         DALRequest.UpdateStatus(rqst);
         Response.Redirect("/Req/REQRequestDetail.aspx?ID=" + REQUESTID);
     }
     else
     {
         ENTREQREQUESTS rqst = DALRequest.GetValueStatus(Guid.Parse(Request.QueryString["ID"]));
         rqst.TYPEREQUESTID = 3;
         DALRequest.UpdateStatus(rqst);
         Response.Redirect("/Req/REQRequests.aspx");
     }
 }