Example #1
0
        public ActionResult BookCarRental()
        {
            //NB - need a method to get all
            //pull back from db the correct extra and pass to viewbag
            List <BookingExtra> CarBookingExtras = BookingExtra.GetBookingExtrasOfType();

            foreach (var cbe in CarBookingExtras)
            {
                cbe.GetAllBookingExtraAttributes();
            }

            //get all the images for all the extras
            List <ExtrasImage> allTheExtraImages = new List <ExtrasImage>();

            ViewBag.CarBookingExtras = CarBookingExtras;

            //list of airports for  transfers

            //drop down lists
            using (var _db = new PortugalVillasContext())
            {
                var listOfAllTypes = _db.BookingExtraTypes.ToSafeReadOnlyCollection();
                //create list and put in viewbag
                List <SelectListItem> selectListOfAllTypes = new List <SelectListItem>();
                selectListOfAllTypes.Add(new SelectListItem {
                    Text = "Show All", Value = "0"
                });

                foreach (var type in listOfAllTypes)
                {
                    selectListOfAllTypes.Add(new SelectListItem {
                        Text = type.ExtraTypeName, Value = type.BookingExtraTypeID.ToString()
                    });
                }
                //add a default


                ViewBag.ExtraTypes = selectListOfAllTypes;
            }

            ViewBag.Keywords = "Portugal Villas, portugal rental cottages, cheap holidays to portugal, silver coast villas,cheap portugal holidays,villa hotel rental portugal";
            ViewBag.Title    = "A quality selection of cars that includes the Hyundai I20,Mitsubishi Colt, Mitsubishi Colt Diesel, Mitsubishi Lancer, Mitsubishi Grandis, you can also book direct airport transfers here to drop you from the airport directly to your villas and add package and sightseeing tours for you and the family, to well loved destinations like Alcobaça, Batalha and Fatima, the Sintra Palace or Obidos and Nazare. See the EXPO 98 & Ocenarium or stay in Salir do Porto, sunny Formigal or the beautiful A-da-Gorda. With cheap seasonal holiday rentals in Sao Martinho do Porto, Barrantes, Capeleira and Sancheira Pequena you can get quality Portugese accommodation the entire year round.";
            return(View());
        }
Example #2
0
        public ActionResult BookAirTransfer()
        {
            ViewBag.AirTransfer = BookingExtra.GetBookingExtrasOfType(3);

            return(View());
        }
Example #3
0
        public ActionResult BookWineTour()
        {
            ViewBag.WineBookingExtras = BookingExtra.GetBookingExtrasOfType(2);

            return(View());
        }
Example #4
0
        public ActionResult BookCarRental(string ExtraType = "0", string priceSort = "", string noOfResults = "0")
        {
            //save vars so can remember them
            ViewBag.ExtraType   = ExtraType;
            ViewBag.priceSort   = priceSort;
            ViewBag.noOfResults = noOfResults;


            int theType = Int32.Parse(ExtraType);
            List <BookingExtra> CarBookingExtras = new List <BookingExtra>();

            switch (theType)
            {
            case 0:
                CarBookingExtras = BookingExtra.GetBookingExtrasOfType();
                break;

            default:
                CarBookingExtras = BookingExtra.GetBookingExtrasOfType(theType);
                break;
            }


            //do additional sorts depending on vars
            //price
            if (priceSort.Equals("LH"))
            {
                CarBookingExtras = CarBookingExtras.OrderBy(x => x.Price).ToList();
            }
            else if (priceSort.Equals("HL"))
            {
                CarBookingExtras = CarBookingExtras.OrderByDescending(x => x.Price).ToList();
            }

            //no of results
            if (noOfResults != "0")
            {
                //pager
            }


            //assign attributes
            foreach (var cbe in CarBookingExtras)
            {
                cbe.GetAllBookingExtraAttributes();
            }

            //get all the images for all the extras
            //List<ExtrasImage> allTheExtraImages = new List<ExtrasImage>();

            ViewBag.CarBookingExtras = CarBookingExtras;


            using (var _db = new PortugalVillasContext())
            {
                var listOfAllTypes = _db.BookingExtraTypes.Where(x => x.BookingExtraTypeID != 11).ToList();
                listOfAllTypes.Add(new BookingExtraType {
                    BookingExtraTypeID = 0, ExtraTypeName = "Show All"
                });
                listOfAllTypes = listOfAllTypes.OrderBy(x => x.BookingExtraTypeID).ToList();
                //create list and put in viewbag
                ViewBag.ExtraTypes = listOfAllTypes;
            }

            ViewBag.Keywords = "holiday villa portugal, silver coast portugal,portugal rental cottages,silver coast villas,cheap holidays to portugal, tourist attractions in portugal";
            ViewBag.Title    = "A quality selection of cars that includes the Hyundai I20,Mitsubishi Colt, Mitsubishi Colt Diesel, Mitsubishi Lancer, Mitsubishi Grandis, you can also book direct airport transfers here to drop you from the airport directly to your villas and add package and sightseeing tours for you and the family, to well loved destinations like Alcobaça, Batalha and Fatima, the Sintra Palace or Obidos and Nazaré. See the EXPO 98 & Ocenarium or stay in Salir do Porto, sunny Formigal or the beautiful A-da-Gorda. With cheap seasonal holiday rentals in Sao Martinho do Porto, Barrantes, Capeleira and Sancheira Pequena you can get quality Portugese accommodation the entire year round.";
            return(View(CarBookingExtras));
        }