public static string IfFeaturedExistsReturnURLElseReturnRandomImage(Property property, DirectoryInfo Server) { string imgRef = @"/PropertyImages/" + property.LegacyReference + "/featured/featured.jpg"; var theImageURL = PRCImageCollection.GetRandomImageURLForProperty(property, Server); var featuredPath = Server.FullName + "PropertyImages\\" + property.LegacyReference + "\\featured\\featured.jpg"; if (File.Exists(featuredPath)) { theImageURL = imgRef; } return(theImageURL); }
public ActionResult FullPropertyResult(string propertyID) { #region FullPropertyResult_CatchNoValue int aTest; if (propertyID == null || propertyID == "" || !(Int32.TryParse(propertyID, out aTest))) { return Redirect("~/Home/SearchProperties"); } #endregion Property theProperty = Property.GetPropertyByID(Int32.Parse(propertyID)); ViewBag.FullPropertyResultProperty = theProperty; PRCImageCollection ImageCollection = new PRCImageCollection(Server, theProperty.LegacyReference); ViewBag.ImageCollection = ImageCollection; //booking calendar population BookingCalendar TestBookingCalendar = new BookingCalendar(Int32.Parse(propertyID)); TestBookingCalendar.GetAllBookingDatesAndAddToThisCalendar(); ViewBag.BookingCalDates = TestBookingCalendar; //Comments List<BootstrapVillas.Models.Comment> theComments = BootstrapVillas.Models.Comment.GetComments(theProperty); //Comment replies ViewBag.Keywords = "portugal rental cottages, silver coast portugal, cheap holidays in portugal, cheap all inclusive holidays to portugal,holiday villa portugal"; ViewBag.IdentifyPage = "FullPropertyResult"; ViewBag.Title = "Here is the information, photos, facilities and features for this Villa, Townhouse, Apartment or Hotel holiday rentals in Portugal. A selective but extensive range of quality holiday properties to choose from, where you can visit Candieeros National Park and take in the sights of Tomar and Fatima on one of our sightseeing tours or wine tours should you wish. Holiday Villas in Olho Marinho, Reguengo Grande, Salir de Matos and Avarela all with luxury extras like Swimming Pools, Pool Heating, Mid Vacation Cleaning and Internet use (please check property). Visit the Loridos Vineyards and stay in one of our classic Portugal Rental Cottages!"; return View(); }
//the Checkout view model for any property public Property_BookingViewModel(HttpServerUtilityBase Server, string PRCRef) { //needs a propertyID thePropertyBookingImages = new PRCImageCollection(Server, PRCRef); }
public ActionResult FullPropertyResult(string propertyID) { #region FullPropertyResult_CatchNoValue int aTest; if (propertyID == null || propertyID == "" || !(Int32.TryParse(propertyID, out aTest)) ) { return Redirect("~/Home/SearchProperties"); } #endregion Property theProperty = Property.GetPropertyByID(Int32.Parse(propertyID)); ViewBag.FullPropertyResultProperty = theProperty; PRCImageCollection ImageCollection = new PRCImageCollection(Server, theProperty.LegacyReference); ViewBag.ImageCollection = ImageCollection; //booking calendar population BookingCalendar TestBookingCalendar = new BookingCalendar(Int32.Parse(propertyID)); TestBookingCalendar.GetAllBookingDatesAndAddToThisCalendar(); ViewBag.BookingCalDates = TestBookingCalendar; return View(); }