Esempio n. 1
0
        public ReservationClient GetReservationClient(IReservationItem rsv, IClient client, IEnumerable <IResourceClient> resourceClients, IEnumerable <IReservationInviteeItem> invitees)
        {
            var physicalAccessUtil = GetPhysicalAccessUtility();
            var inlab = physicalAccessUtil.ClientInLab(client.ClientID, rsv.LabID);

            return(ReservationClient.Create(rsv, client, resourceClients, invitees, inlab));
        }
Esempio n. 2
0
 public ActionResult Edit(Reservation reservation)
 {
     if (ModelState.IsValid)
     {
         ReservationClient client = new ReservationClient();
         if (reservation.ReservationId == 0)
         {
             client.Create(reservation);
         }
         else
         {
             if (client.Update(reservation))
             {
                 TempData["message"] = string.Format($"The ReservationID " +
                                                     $"{reservation.ReservationId} has been saved");
             }
         }
         return(RedirectToAction("Index"));
     }
     else
     {
         return(View(reservation));
     }
 }