コード例 #1
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);
        }
コード例 #2
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;
     }
 }
コード例 #3
0
 public async Task <object> Execute()
 {
     return(await BookingHandler.AddBooking(NewBooking, ChosenEquipmentList));
 }