public async Task <IActionResult> Create(BookingModel booking)
        {
            try
            {
                List <CategoryModel> categoryList = await ApiConnection.GetCategoryList();

                List <RoomModel> roomList = await ApiConnection.GetRoomList();

                List <BookingModel> bookingList = await ApiConnection.GetBookingList();

                List <RoomModel> qualifiedrooms = new List <RoomModel>();
                List <RoomModel> corcatroom     = new List <RoomModel>();

                int bookingstart = int.Parse(DateTime.Parse(booking.StartDate.ToString()).ToString().Remove(10, 9).Remove(4, 1).Remove(6, 1)); //parsar datetime till int
                int bookingend   = int.Parse(DateTime.Parse(booking.EndDate.ToString()).ToString().Remove(10, 9).Remove(4, 1).Remove(6, 1));   //parsar datetime till int
                int dateToday    = int.Parse(DateTime.Parse(DateTime.Today.ToString()).ToString().Remove(10, 9).Remove(4, 1).Remove(6, 1));

                if (bookingstart < bookingend && bookingstart >= dateToday) //kollar så bokningens startdatum inte är före dagens datum.
                {
                    corcatroom.AddRange(from item in roomList
                                        where item.CategoryId == booking.CategoryId
                                        select item);

                    List <BookingModel> corcatbooking = new List <BookingModel>();

                    BookingHandler.RoomAvailableCheckV2(bookingList, corcatroom, bookingstart, bookingend);

                    if (corcatroom.Count > 0) //kollar ifall det finns tillgängliga rum
                    {
                        var          room         = corcatroom.First();
                        BookingModel finalBooking = BookingHandler.SetFinalBooking(booking, room);

                        var postTask = ApiConnection.ApiClient.PostAsJsonAsync <BookingModel>("BookingModels", finalBooking);
                        postTask.Wait();

                        var result = postTask.Result;
                        return(RedirectToAction("Confirmation", "Booking"));
                    }
                    else
                    {
                        ViewData["norooms"] = "Det finns inga lediga rum av din preferenser";
                        await ViewbagCategory();

                        return(View(new BookingModel()));
                    }
                }
                else
                {
                    ViewData["wrongtime"] = "Vänligen fyll i en korrekt tid. Slutdatumet måste vara senare än startdatumet.";
                    await ViewbagCategory();

                    return(View(new BookingModel()));
                }
            }
            catch (Exception ex)
            {
                _logger.LogWarning("Could not create booking: HttpPost", ex);
                return(View());
            }
        }
示例#2
0
        private string PrepareBookingDetails(int BookingId)
        {
            #region GetBookingDetails
            BookingHandler bookingHandler = new BookingHandler();
            BookingDTO     bookingDTO     = bookingHandler.GetBookingDetails(BookingId);
            StringBuilder  emailText      = new StringBuilder();
            emailText.Append(string.Empty);
            string BookingText = string.Empty;
            if (bookingDTO != null)
            {
                BookingText = PrepareBookingText(bookingDTO);
            }
            emailText.Append(BookingText);
            #endregion

            emailText.Append("</br>");

            #region GetBookingRoomDetails
            BookingRoomReportsDTO[]   oBRRD = null;
            BookingRoomReportsHandler oBRM  = new BookingRoomReportsHandler();
            string BookingDetailsText       = string.Empty;
            oBRRD = oBRM.GetDetailedBookingDetails(BookingId);
            if (oBRRD != null)
            {
                if (oBRRD.Length > 0)
                {
                    BookingDetailsText = PrepareBookingRoomDetailsText(oBRRD);
                }
            }
            emailText.Append(BookingDetailsText);
            #endregion

            return(emailText.ToString());
        }
        public async Task <IActionResult> Index(string sortOrder, int?pageNumber, int pageSize = 5)
        {
            try
            {
                List <BookingModel> bookingList = await ApiConnection.GetBookingList();

                List <CategoryModel> categoryList = await ApiConnection.GetCategoryList();

                List <RoomdescModel> roomdescList = await ApiConnection.GetRoomdescList();

                BookingHandler.PlaceCategoryInBooking(bookingList, categoryList, roomdescList); //placerar kategoribeskrivning i bokningslistan

                ViewData["CurrentSort"] = sortOrder;

                ViewDataImport(sortOrder);
                bookingList = BookingListViewHelper.ColumnSwitch(sortOrder, bookingList);


                return(View(await PaginatedList <BookingModel> .CreatePaging(bookingList, pageNumber ?? 1, pageSize)));
            }
            catch (Exception ex)
            {
                _logger.LogWarning("Could not fetch bookings", ex);
                return(RedirectToAction("Privacy", "Home"));
            }
        }
        public async Task <IActionResult> SuperDelete(int?id)
        {
            try
            {
                List <BookingModel> bookingList = await ApiConnection.GetBookingList();

                List <CategoryModel> categoryList = await ApiConnection.GetCategoryList();

                List <RoomdescModel> roomdescList = await ApiConnection.GetRoomdescList();

                BookingHandler.PlaceCategoryInBooking(bookingList, categoryList, roomdescList); //placerar kategoribeskrivning i bokningslistan
                foreach (var item in bookingList)
                {
                    if (id == item.Id)
                    {
                        return(View(item));
                    }
                }
                return(RedirectToAction("Index", "Booking"));
            }
            catch (Exception ex)
            {
                _logger.LogWarning("Could not show delete confirmation screen", ex);
                throw;
            }
        }
示例#5
0
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (XtraMessageBox.Show("La prenotazione corrente sarà eliminata. Continuare?", "Domanda", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
                {
                    //elimino dal calendario tutte le assegnazioni
                    foreach (Assignment item in _currentBooking.Assignments)
                    {
                        Appointment app = GetAppointment(item);
                        if (app != null)
                        {
                            _control.Storage.Appointments.Remove(app);
                        }
                    }


                    BookingHandler h = new BookingHandler();
                    h.Delete(_currentBooking.BaseObject);
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                ErrorHandler.Show(ex);
            }
        }
示例#6
0
        public UserBookingView()
        {
            this.InitializeComponent();

            log             = new LoginVm();
            col             = new Collector();
            _bookingHandler = new BookingHandler();
            savm            = new SelectedActivityViewVM();
            selectedColor   = new SolidColorBrush(Colors.Yellow);
            red             = new SolidColorBrush(Windows.UI.Colors.Red);
            cds             = CurrentDateSingleton.GetInstance();

            CalendarView.SelectedDates.Add(new DateTime(2017, 10, 29));    // Set selected date is "x date");
            CalendarView.MinDate             = new DateTime(2017, 11, 1);  //Min date is "x date "
            CalendarView.MaxDate             = DateTime.Now.AddMonths(12); //Max date is "x" months from current date
            CalendarView.NumberOfWeeksInView = 5;                          //Month view show "x" weeks at a time
            CalendarView.SelectedForeground  = selectedColor;

            _eventListSingleton = EventListSingleton.GetInstance();
            _eventListSingleton.SetEvents(col.Events);
            cds = CurrentDateSingleton.GetInstance();

            ChooseEventList();
            dates = new List <DateTimeOffset>();
        }
示例#7
0
        public bool AddSeriesBooking(SeriesDTO SeriesDTO, List <SeriesDetailDTO> oSeriesDetailList, List <BookingOfSeriesDTO> BookingsOfSeries, out int SeriesId)
        {
            int                 iSeriesId            = 0;
            int                 iBookingId           = 0;
            BookingHandler      bookingHandler       = new BookingHandler();
            SeriesDetailHandler oSeriesDetailHandler = new SeriesDetailHandler();
            //BookingDTO oBookingData;
            //BookedRooms oBookedRooms;
            //BookingWaitListDTO oBookingWaitListData;
            //BookingOfSeriesDTO FinalizedBookingDTO;
            List <BookingOfSeriesDTO> FinalizedBookingList = new List <BookingOfSeriesDTO>();

            #region Saving Series in Master and Detail
            AddSeries(SeriesDTO, out iSeriesId);

            foreach (SeriesDetailDTO var in oSeriesDetailList)
            {
                var.SeriesID = iSeriesId;
            }
            oSeriesDetailHandler.AddSeriesDetail(oSeriesDetailList);
            #endregion

            #region Pulling EveryBooking and Saving It
            foreach (BookingOfSeriesDTO FinalBooking in BookingsOfSeries)
            {
                FinalBooking.Booking.SeriesId = iSeriesId;
                bookingHandler.AddBooking(FinalBooking.Booking, FinalBooking.BookedRooms.ToArray(), FinalBooking.WaitListedRooms.ToArray(), out iBookingId);
            }
            #endregion Pulling EveryBooking and Saving It
            SeriesId = iSeriesId;
            return(true);
        }
示例#8
0
文件: Program.cs 项目: coolworker/yue
        private static void Subscribe()
        {
            SubscribeResource sr = new SubscribeResource(1, 1, 100, "test", 1000, DateTime.Now,
                new Bookings.Contract.TimeSlot(DateTime.Now, DateTime.Now.AddHours(4).AddSeconds(32)));

            SqlOption option = new SqlOption { ConnectionString = "Server=localhost;Port=3306;Database=yue;Uid=root;Pwd=123456;" };
            BookingWriteRepository bookingWriteRepository = new BookingWriteRepository(option);
            BookingHandler bookingHandler = new BookingHandler(bookingWriteRepository);
            bookingHandler.Execute(sr);
        }
示例#9
0
        public CustomerBooking(int bookingId)
        {
            InitializeComponent();

            BookingHandler h = new BookingHandler();

            _currentBooking = h.GetElementById(bookingId.ToString()) as Booking;
            PaymentSectionInitializzation();
            LoadComboTipoPrenotazione();
            LoadComboOperatori();
            LoadCurrentBookingData();
        }
示例#10
0
        private void UpdateBooking()
        {
            _currentBooking.Date          = dtpDate.DateTime;
            _currentBooking.BookingType   = cboTipo.EditValue as BookingType;
            _currentBooking.Notes         = memoEdit1.Text;
            _currentBooking.Operator      = cboOp.EditValue as Operator;
            _currentBooking.Color         = colorEdit1.Color.ToArgb();
            _currentBooking.ColorBookings = chkColorBookings.Checked;
            _currentBooking.Notes1        = memoEdit2.Text;
            if (chkConfirm.Checked)
            {
                _currentBooking.ConfirmBooking();
                //aggiungo tutti gli altri dati di conferma


                _currentBooking.SetTotal((float)spTotale.Value);
                _currentBooking.SetStayTax((float)spTassa.Value);

                if (spAcconto.Value != 0)
                {
                    _currentBooking.SetAccount(dtpAcconto.DateTime, (float)spAcconto.Value, cboModAcconto.EditValue as PaymentType);
                }
                else
                {
                    _currentBooking.SetAccount(DateTime.MinValue, 0, null);
                }

                if (spSaldo.Value != 0)
                {
                    _currentBooking.SetRestOfTypePayment(dtpSaldo.DateTime, (float)spSaldo.Value, cboModSaldo.EditValue as PaymentType);
                }
                else
                {
                    _currentBooking.SetRestOfTypePayment(DateTime.MinValue, 0, null);
                }
            }
            else
            {
                _currentBooking.UnConfirmBooking();
            }

            BookingHandler h = new BookingHandler();

            h.SaveOrUpdate(_currentBooking.BaseObject);

            //rinfresco
            SetImageAndDescriptionState();
            UpdateRiepiloghi();
        }
示例#11
0
 public BookingDTO[] GetConfirmMailDetails(int BookingId)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.GetConfirmMail(BookingId));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#12
0
 public DataSet GetBookingsCruiseFH(cdtGetBookingsInput getBookingsInput)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.GetBookingsCruiseFH(getBookingsInput));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#13
0
 public List <ViewBookingDTO> GetBookingsFH(cdtGetBookingsInput getBookingsInput)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.GetBookingsFH(getBookingsInput));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#14
0
 public BookingDTO[] GetBookingDetails(DateTime FromDate, DateTime ToDate)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.GetBookingDetails(FromDate, ToDate));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#15
0
 public int GetBookingReferenceCount(BookingDTO BookingData)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.GetBookingReferenceCount(BookingData));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#16
0
 public bool CancelBooking(int BookingId)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.CancelBooking(BookingId));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#17
0
 public bool UpdateBooking(BookingDTO oBookingData, BookedRooms[] oBookedRooms, BookingWaitListDTO[] oBookingWaitListData, BookedRooms[] TotallyRemovedRoomCategoryAndType)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.UpdateBooking(oBookingData, oBookedRooms, oBookingWaitListData, TotallyRemovedRoomCategoryAndType));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#18
0
 public bool AddBooking(BookingDTO oBookingData, BookedRooms[] oBookedRooms, BookingWaitListDTO[] oBookingWaitListData, out int BookingId)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.AddBooking(oBookingData, oBookedRooms, oBookingWaitListData, out BookingId));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#19
0
 public DataSet CheckifCharteredBookingExists(DateTime frm, DateTime to)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.CheckifCharteredBookingExists(frm, to));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#20
0
        private void schedulerStorage1_AppointmentDeleting(object sender, PersistentObjectCancelEventArgs e)
        {
            try
            {
                Nested_CheckSecurityForDeletion();
            }
            catch (AccessDeniedException)
            {
                ErrorHandler.Show("Impossibile accedere alla funzionalità richiesta. Accesso negato");
                e.Cancel = true;
                return;
            }


            //if (XtraMessageBox.Show("Sicuro di procedere alla cancellazione dell'assegnazione?", "Domanda", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            //{

            DevExpress.XtraScheduler.Appointment app = e.Object as DevExpress.XtraScheduler.Appointment;

            Assignment a = app.GetSourceObject(schedulerStorage1) as Assignment;
            IBooking   b = a.Booking;

            //aggiorno lo stato della prenotaizone
            a.Booking.RemoveAssignment(a);

            if (b.Assignments.Count == 0)
            {
                //elimino l'intera prenotazione
                BookingHandler h = new BookingHandler();

                h.Delete(b.BaseObject);
            }
            else
            {
                //elimino solo la assegnazione corrente
                ////i save on my db
                AssignmentHandler h = new AssignmentHandler();

                h.Delete(a);
            }



            //    return;
            //}

            //e.Cancel = true;
        }
        public ActionResult DeleteConfirmed(int id)
        {
            User u = (User)Session[WebUtil.CURRENT_USER];

            if (!(u != null && u.IsInRole(WebUtil.ADMIN_ROLE)))
            {
                return(RedirectToAction("Login", "User", new { ctl = "Admin", act = "AdminPanel" }));
            }
            Booking booking = new BookingHandler().GetBookingById(id);

            db.Entry(booking.Tour).State = EntityState.Unchanged;
            db.Entry(booking.User).State = EntityState.Unchanged;
            db.Entry(booking).State      = EntityState.Deleted;
            db.Bookings.Remove(booking);
            db.SaveChanges();
            return(RedirectToAction("BookingList"));
        }
示例#22
0
        public void BookRoom_WithEmptyStore_ShouldBeSuccessful()
        {
            var store = new InMemoryStore();

            Assert.Empty(store.AllBookings());

            var bus     = new FakeBus();
            var handler = new BookingHandler(new BookingService(store, bus));

            bus.Subscribe <BookRoom>(handler.Handle);

            bus.Send(new BookRoom("Room1", DateTime.Now, DateTime.Now.AddDays(2)));

            var bookings = store.AllBookings();

            Assert.NotEmpty(bookings);
            Assert.Single(bookings);
            Assert.Equal("Room1", bookings.Single().RoomName);
        }
示例#23
0
        private IBooking CreateNewBooking()
        {
            BookingHandler h = new BookingHandler();

            IBooking b = new Booking();

            b.Date          = DateTime.Now;
            b.BookingType   = new BookingTypeHandler().GetAll()[0] as BookingType;
            b.Notes         = "";
            b.Operator      = null;
            b.Color         = Color.WhiteSmoke.ToArgb();
            b.ColorBookings = false;
            b.Notes1        = "";
            b.UnConfirmBooking();

            h.SaveOrUpdate(b as Booking);

            return(b);
        }
示例#24
0
        private CFormReportDTO GetCFormData(int bookingId, bool foreignNationals, bool indianNationals)
        {
            CFormReportDTO cFormReportDto;
            BookingDTO     bookingDetailsDto;

            BookingTouristDTO[]   bookingTouristDetailsDto;
            BookingHandler        bookingHandler;
            BookingTouristHandler touristHandler;

            try
            {
                bookingHandler = new BookingHandler();
                touristHandler = new BookingTouristHandler();
                cFormReportDto = new CFormReportDTO();

                GenerateCFormNumbers(bookingId);

                bookingDetailsDto      = bookingHandler.GetBookingDetails(bookingId);
                cFormReportDto.CFormNo = GetBookingCFormNo(bookingDetailsDto, foreignNationals, indianNationals);

                cFormReportDto.BookingDetails = bookingDetailsDto;

                bookingTouristDetailsDto = touristHandler.GetAllTouristDetails(bookingId);

                if (foreignNationals && indianNationals)
                {
                    cFormReportDto.BookingTouristDetails = bookingTouristDetailsDto;
                }
                else if (foreignNationals)
                {
                    cFormReportDto.BookingTouristDetails = GetForeignNationalsData(bookingTouristDetailsDto);
                }
                else if (indianNationals)
                {
                    cFormReportDto.BookingTouristDetails = GetIndianNationalsData(bookingTouristDetailsDto);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            return(cFormReportDto);
        }
示例#25
0
 public BookingDTO[] GetRoomBookings(string RoomNo)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.GetRoomBookings(RoomNo));
     }
     catch (Exception exp)
     {
         throw exp;
     }
     finally
     {
         bookingHandler = null;
     }
 }
        public ActionResult Delete(int?id)
        {
            User u = (User)Session[WebUtil.CURRENT_USER];

            if (!(u != null && u.IsInRole(WebUtil.ADMIN_ROLE)))
            {
                return(RedirectToAction("Login", "User", new { ctl = "Admin", act = "AdminPanel" }));
            }
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Booking booking = new BookingHandler().GetBookingById(id);

            if (booking == null)
            {
                return(HttpNotFound());
            }
            return(View(booking));
        }
示例#27
0
 private void SetGridDataSource()
 {
     try
     {
         BookingHandler hh = new BookingHandler();
         DataRange      r  = null;
         if (dateEdit1.DateTime > dateEdit2.DateTime)
         {
             r = new DataRange(dateEdit2.DateTime, dateEdit1.DateTime);
         }
         else
         {
             r = new DataRange(dateEdit1.DateTime, dateEdit2.DateTime);
         }
         IList h = hh.GetBookings(r);
         if (h.Count == 0)
         {
             XtraMessageBox.Show("Nessuna prenotazione trovata", "Messaggio", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             try
             {
                 gridControl1.MainView.SaveLayoutToXml(fileLayout);
             }
             catch (Exception)
             {
                 //non fa nulla
             }
         }
         gridControl1.DataSource = h;
     }
     catch (Exception ex)
     {
         WIN.SCHEDULING_APP.GUI.Utility.ErrorHandler.Show(ex);
     }
 }
        public async Task <IActionResult> Edit(int id, int GuestId, [Bind("Id,CategoryId,StartDate,EndDate,GuestId")] BookingModel booking)
        {
            try
            {
                //först måste vi ta bort aktuell bokning från den lokala bokningslistan
                //anropa metod för att kolla om bokningen är möjlig
                List <RoomModel> roomList = await ApiConnection.GetRoomList();

                List <BookingModel> bookingList = await ApiConnection.GetBookingList();

                foreach (var item in bookingList)
                {
                    if (booking.Id == item.Id)
                    {
                        bookingList.Remove(item);
                        break;
                    }
                }

                int bookingstart = int.Parse(DateTime.Parse(booking.StartDate.ToString()).ToString().Remove(10, 9).Remove(4, 1).Remove(6, 1)); //parsar datetime till int
                int bookingend   = int.Parse(DateTime.Parse(booking.EndDate.ToString()).ToString().Remove(10, 9).Remove(4, 1).Remove(6, 1));   //parsar datetime till int
                int dateToday    = int.Parse(DateTime.Parse(DateTime.Today.ToString()).ToString().Remove(10, 9).Remove(4, 1).Remove(6, 1));

                List <RoomModel> corcatroom = new List <RoomModel>();

                if (bookingstart < bookingend && bookingstart >= dateToday) //kollar så bokningens start datum inte är efter slutdatum
                {
                    corcatroom.AddRange(from item in roomList
                                        where item.CategoryId == booking.CategoryId
                                        select item);

                    //---------------------------------------------------------------------------------------------------------------------------------------------

                    BookingHandler.RoomAvailableCheckV2(bookingList, corcatroom, bookingstart, bookingend);

                    RoomModel Besterummet = new RoomModel();

                    if (corcatroom.Count() > 0)
                    {
                        Besterummet = corcatroom.First();

                        BookingModel finalBooking = new BookingModel();
                        finalBooking.Id        = booking.Id;
                        finalBooking.StartDate = booking.StartDate;
                        finalBooking.EndDate   = booking.EndDate;
                        finalBooking.RoomId    = Besterummet.Id;
                        finalBooking.GuestId   = GuestId;

                        HttpResponseMessage response = ApiConnection.ApiClient.PutAsJsonAsync("BookingModels/" + finalBooking.Id, finalBooking).Result;
                        return(RedirectToAction(nameof(Index)));
                    }
                    else
                    {
                        ViewData["norooms"] = "Det finns inga lediga rum av din preferenser";
                        await ViewbagCategory();

                        return(View());
                    }
                }
                else
                {
                    ViewData["wrongtime"] = "Denna ändring är inte möjlig";
                    await ViewbagCategory();

                    return(RedirectToAction("Privacy", "Home"));
                }
            }
            catch (Exception ex)
            {
                _logger.LogWarning("Could not edit booking: HttpPost", ex);
                throw;
            }
        }
 public GetCoincidingBookingsCommand(DateTime requestedStartDate, DateTime requestedEndDate, ApplicationDbContext dbContext)
 {
     BookingHandler     = new BookingHandler(dbContext);
     RequestedStartDate = requestedStartDate;
     RequestedEndDate   = requestedEndDate;
 }
示例#30
0
 public UpdateBookingCommand(Booking booking, List <Equipment> chosenEquipmentList, ApplicationDbContext dbContext)
 {
     Booking             = booking;
     ChosenEquipmentList = chosenEquipmentList;
     BookingHandler      = new BookingHandler(dbContext);
 }
示例#31
0
 public AddBookingCommand(Booking newBooking, List <Equipment> chosenEquipmentList, ApplicationDbContext dbContext)
 {
     BookingHandler      = new BookingHandler(dbContext);
     NewBooking          = newBooking;
     ChosenEquipmentList = chosenEquipmentList;
 }