public Model.ReservationListing GetReservationListing(RequestParams requestParams)
        {
            IReservationListingDataProvider reservationListingDataProvider =
                ReservationListingDataProviderFactory.CreateReservationListingDataProvider();

            if (reservationListingDataProvider != null)
            {
                return reservationListingDataProvider.GetReservationListing(requestParams);
            }

            return null;
        }
        public ReservationListing GetReservationListing(RequestParams requestParams)
        {
            try
            {
                var db = new MySqlDatabase(DbConfiguration.DatabaseRead);

                ReservationFilterInfo filterInfo = null;
                PagingInfo pagingInfo = null;

                if (requestParams != null)
                {
                    filterInfo = (requestParams.FilterInfo != null &&
                                  requestParams.FilterInfo is ReservationFilterInfo)
                                     ? requestParams.FilterInfo as ReservationFilterInfo
                                     : null;
                    pagingInfo = requestParams.PagingInfo ?? new PagingInfo
                                                                 {
                                                                     PageSize = 10,
                                                                     PageNumber = 1
                                                                 };
                }

                MySqlCommand command = CommandBuilder.BuildGetReservationListingCommand(filterInfo, pagingInfo,
                                                                                        db.Connection);

                DataSet dataSet = db.ExecuteQuery(command);

                ReservationListing reservationListing = GetReservationListing(dataSet);
                return reservationListing;
            }
            catch (Exception ex)
            {
                DBExceptionLogger.LogException(ex, Source, "GetReservationListing", Severity.Critical);
                return null;
            }
        }
 public Model.ReservationListing GetReservationListing(RequestParams requestParams)
 {
     return new Model.ReservationListing
                {
                    Reservations = new List<Reservation>
                                       {
                                           new Reservation
                                               {
                                                   BookingDate = DateTime.Now.AddDays(-15),
                                                   FromAirport = "PNQ",
                                                   ToAirport = "DEL",
                                                   Name = "Abhimanyu Chankravarty",
                                                   Passengers = new List<Passenger>
                                                                    {
                                                                        new Passenger
                                                                            {
                                                                                DateOfBirth =
                                                                                    new DateTime(1988, 12, 1),
                                                                                FirstName = "Abhimanyu",
                                                                                Gender = "Male",
                                                                                LastName = "Chakravarty",
                                                                                Title = "Mr."
                                                                            }
                                                                    },
                                                   PNR = "12345",
                                                   TravelDate = DateTime.Now.AddDays(-5)
                                               },
                                           new Reservation
                                               {
                                                   BookingDate = DateTime.Now.AddDays(-15),
                                                   FromAirport = "PNQ",
                                                   ToAirport = "DEL",
                                                   Name = "Varun Jain",
                                                   Passengers = new List<Passenger>
                                                                    {
                                                                        new Passenger
                                                                            {
                                                                                DateOfBirth =
                                                                                    new DateTime(1988, 12, 1),
                                                                                FirstName = "Varun",
                                                                                Gender = "Male",
                                                                                LastName = "Jain",
                                                                                Title = "Mr."
                                                                            }
                                                                    },
                                                   PNR = "98765",
                                                   TravelDate = DateTime.Now.AddDays(-5)
                                               },
                                           new Reservation
                                               {
                                                   BookingDate = DateTime.Now.AddDays(-15),
                                                   FromAirport = "PNQ",
                                                   ToAirport = "DEL",
                                                   Name = "Mahesh Tokle",
                                                   Passengers = new List<Passenger>
                                                                    {
                                                                        new Passenger
                                                                            {
                                                                                DateOfBirth =
                                                                                    new DateTime(1988, 12, 1),
                                                                                FirstName = "Mahesh",
                                                                                Gender = "Male",
                                                                                LastName = "Tokle",
                                                                                Title = "Mr."
                                                                            }
                                                                    },
                                                   PNR = "57575",
                                                   TravelDate = DateTime.Now.AddDays(-5)
                                               }
                                       }
                };
 }