public void ChangeReservationStatus(ChangeReservationStatus status) { var reservation = GetReservation(status.ReservationId); reservation.StatusReservation = status.StatusReservation; db.Entry(reservation).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); }
public PartialViewResult ChangeReservationStatus(int reservationId) { var reservation = reservationService.GetReservation(reservationId); ChangeReservationStatus vm = new ChangeReservationStatus(); vm.ReservationId = reservationId; vm.StatusReservation = reservation.StatusReservation; return(PartialView("_ChangeReservationStatus", vm)); }
public ActionResult ChangeReservationStatus(ChangeReservationStatus status) { reservationService.ChangeReservationStatus(status); return(RedirectToAction("Index", "Home")); }