Пример #1
0
        public ActionResult Edit(Reservation reservation)
        {
            RESTClientClient RESTClientClient = new RESTClientClient();
            RESTRoomClient   RESTRoomClient   = new RESTRoomClient();

            reservation.Client = RESTClientClient.getClientById(reservation.Client.Id);
            reservation.Room   = RESTRoomClient.getRoomById(reservation.Room.Id);

            RESTReservationClient.PutReservation(reservation);

            return(RedirectToAction("index"));
        }
Пример #2
0
        public ActionResult Create()
        {
            RESTClientClient RESTClientClient = new RESTClientClient();
            RESTRoomClient   RESTRoomClient   = new RESTRoomClient();

            ReservationVM rVM = new ReservationVM();

            rVM.Clients = RESTClientClient.getClients();
            rVM.Rooms   = RESTRoomClient.GetRooms();

            return(View(rVM));
        }
Пример #3
0
        public ActionResult Edit(int id)
        {
            RESTClientClient RESTClientClient = new RESTClientClient();
            RESTRoomClient   RESTRoomClient   = new RESTRoomClient();

            ReservationVM rvm = new ReservationVM();

            rvm.Clients     = RESTClientClient.getClients();
            rvm.Rooms       = RESTRoomClient.GetRooms();
            rvm.reservation = RESTReservationClient.getReservationById(id);

            return(View(rvm));
        }