Int32 DisplayLocation(string CountryDepartureFilter) { //var to store the CountryDeparture string CountryDeparture; //var to store the AirportDestination string AirportDestination; //create an instance of location collection class clsLocationCollection Location = new clsLocationCollection(); Location.ReportByCountryDeparture(CountryDepartureFilter); //var to store the count of records Int32 RecordCount; //var to store the index for the loop Int32 Index = 0; //get the count of records RecordCount = Location.Count; //clear the list box lstLocation.Items.Clear(); //while there are records while (Index < RecordCount) { //get the CountryDeparture CountryDeparture = Location.LocationList[Index].CountryDeparture; //get the AirportDestination AirportDestination = Location.LocationList[Index].AirportDestination; //create a new entry for th list box ListItem NewEntry = new ListItem(CountryDeparture + " " + AirportDestination.ToString()); //add the customer to the list lstLocation.Items.Add(NewEntry); //move the index to the next record Index++; } //return to the count of records found return(RecordCount); }
public ActionResult GetBookingDetails() { Customer customer = new Customer(); var testCus = Session["prc_customer"]; if (testCus != null) { customer = (Customer)Session["prc_customer"]; } CustomerBankDetail customerBankDetail = new CustomerBankDetail(); var testBank = Session["prc_customerBankingDetail"]; if (testBank != null) { customerBankDetail = (CustomerBankDetail)Session["prc_customerBankingDetail"]; } var model = new FinalBookingDetailViewModel(); model.Customer = customer; model.CustomerBankDetail = customerBankDetail; //test if any booking in the cart, if so pass them into the model List <Booking> bookings = new List <Booking>(); if (Session["Cart_PropertyBookings"] != null) { bookings = (List <Booking>)Session["Cart_PropertyBookings"]; model.Bookings = bookings; foreach (var booking in bookings) { booking.Property = db.Properties.Find(booking.PropertyID); } } List <BookingExtraSelection> bes = new List <BookingExtraSelection>(); if (Session["Cart_ExtraBookings"] != null) { bes = (List <BookingExtraSelection>)Session["Cart_ExtraBookings"]; model.BookingExtraSelections = bes; foreach (var b in bes) { b.BookingExtra = db.BookingExtras.Find(b.BookingExtraID); } } //test if any bes in the cart, if so pass them into the model List <AirportDestination> apd = AirportDestination.GetAllAirportDestinations().ToList(); List <SelectListItem> airportDestinations = new List <SelectListItem> (); /* * foreach (var airportDestination in apd) * { * airportDestinations.Add(new SelectListItem { Text = @airportDestination.AirportPickupLocationName, Value = @airportDestination.AirportPickupLocationID.ToString() }) * ; * }*/ airportDestinations.Add(new SelectListItem { Selected = true, Value = "1", Text = "BoggleWoggle" }); ViewBag.AirportDest = airportDestinations; ViewBag.Keywords = "cheap all inclusive holidays to portugal,holiday villa portugal,holiday apartments in portugal,portugal rental cottages,cheap package holidays to portugal, cheap holidays to portugal all inclusive"; ViewBag.Title = "Search for villas townhouses, apartments in rural, seaside or city break settings. Book holidays in portugal's silver coast, in Foz do Arelho, Salir do Porto, Olho Marinho or Formigal. Book car rental, wine tours, site seeing tours with Portugal Rental Cottages. Rent Hyundai I20, Mitsubishi Lancer, Mitsubishi Grandis, go siteseeing with Lisbon City Tours or Sintra Palace Tours, get 9 Seater Van transport from the airport and have full Cleaning Service, Breakfast and Swimming Towels provided! Visit EXPO 98 & Ocenarium on your Portugal Holiday Rental!"; return(View(model)); }