示例#1
0
 public BookingDTO GetBookingDetails(int BookingId)
 {
     try
     {
         if (bookingHandler == null)
         {
             bookingHandler = new BookingHandler();
         }
         return(bookingHandler.GetBookingDetails(BookingId));
     }
     catch (Exception exp)
     {
         throw exp;
     }
 }
示例#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());
        }
示例#3
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);
        }