Esempio n. 1
0
        public ActionResult Confirm(CareRequests model)
        {
            var request = repository.GetById(model.RequestID);

            request.RequestStatus = RequestStatus.Confirmed.ToString();
            repository.Save();
            return(RedirectToAction("Requests", "CareRequest"));
        }
Esempio n. 2
0
        public ActionResult AddRequest(CareRequests model)
        {
            if (ModelState.IsValid)
            {
                model.UserID = SecurityController.Userid;
                int id = Convert.ToInt32(Request.Form["VehicleList"]);
                model.VehicleID     = id;
                model.RequestStatus = RequestStatus.Unconfirmed.ToString();

                repository.Insert(model);
                repository.Save();
                return(RedirectToAction("Index", "CareRequest"));
            }
            return(View());
        }
Esempio n. 3
0
        public ActionResult DeleteRequest(int RequestID)
        {
            CareRequests model = repository.GetById(RequestID);

            return(View(model));
        }