Esempio n. 1
0
        protected void btnCloseRequest_Click(object sender, EventArgs e)
        {
            string requestID = Request.QueryString["requestID"];

            if (int.TryParse(requestID, out int reqID))
            {
                MaintenceBL mainBL = new MaintenceBL();
                mainBL.CloseRequest(reqID);
            }
        }
Esempio n. 2
0
        protected void GetRequest(int id)
        {
            DataTable requestInfo = new MaintenceBL().GetMaintenceRequest(id);

            if (requestInfo.Rows.Count > 0)
            {
                DataRow requestRow = requestInfo.Rows[0];
                txtUnitID.Value = requestRow["UnitID"].ToString();
                txtIssue.Value  = requestRow["RequestDetails"].ToString();
            }
        }
Esempio n. 3
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            MaintenceBL           main     = new MaintenceBL();
            MaintenceRequestModel mainData = new MaintenceRequestModel();

            mainData.RequestDate    = DateTime.Now;
            mainData.RequestDetails = txtIssue.Value;
            mainData.UserID         = Sess.Person.UserID;
            if (int.TryParse(txtUnitID.Value, out int unitID))
            {
                mainData.UnitID = unitID;
            }
            mainData.PropertyID = Sess.ActivePropertyID;
            main.AddMaintenceRequest(mainData);

            Response.Redirect("MaintenceRequest.aspx");
        }
        protected void LoadData()
        {
            DataTable workInfo = new WorkOrderBL().GetWorkOrder(int.Parse(Request.QueryString["WorkOrderID"]));

            if (workInfo.Rows.Count > 0)
            {
                DataTable mainInfo = new MaintenceBL().GetMaintenceRequest(int.Parse(workInfo.Rows[0]["MaintenceRequestID"].ToString()));

                txtWorkOrderID.Value = workInfo.Rows[0]["WorkOrderID"].ToString();
                txtRequestID.Value   = workInfo.Rows[0]["MaintenceRequestID"].ToString();
                txtNotes.Value       = workInfo.Rows[0]["Notes"].ToString();
                txtPromiseDate.Value = workInfo.Rows[0]["PromiseDate"].ToString();
                txtStatus.Value      = workInfo.Rows[0]["CurrentStatus"].ToString();

                txtIssue.Value  = mainInfo.Rows[0]["RequestDetails"].ToString();
                txtUnitID.Value = mainInfo.Rows[0]["UnitID"].ToString();
            }
        }