public ActionResult Confirm(CareRequests model) { var request = repository.GetById(model.RequestID); request.RequestStatus = RequestStatus.Confirmed.ToString(); repository.Save(); return(RedirectToAction("Requests", "CareRequest")); }
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()); }
public ActionResult DeleteRequest(int RequestID) { CareRequests model = repository.GetById(RequestID); return(View(model)); }