protected override void GenerateFormattedListing(HtmlTextWriter output, IListing listing) { output.AddAttribute(HtmlTextWriterAttribute.Href, this.relativePath); output.AddAttribute(HtmlTextWriterAttribute.Target, "_blank"); output.RenderBeginTag(HtmlTextWriterTag.A); if (listing.Title.Split(this.Delimiter.ToCharArray()).Count() == 2 && this.Delimiter != string.Empty) { output.Write(listing.Title.Split(this.Delimiter.ToCharArray())[0]); } else { output.Write(listing.Title); } output.RenderEndTag(); output.AddAttribute(HtmlTextWriterAttribute.Class, "alignRight"); output.RenderBeginTag(HtmlTextWriterTag.Span); if (listing.Title.Split(this.Delimiter.ToCharArray()).Count() == 2 && this.Delimiter != string.Empty) { output.Write(listing.Title.Split(this.Delimiter.ToCharArray())[1]); } else { output.Write(string.Empty); } output.RenderEndTag(); }
protected virtual void GenerateFormattedListing(HtmlTextWriter output, IListing listing) { output.AddAttribute(HtmlTextWriterAttribute.Href, this.relativePath); output.AddAttribute(HtmlTextWriterAttribute.Target, "_blank"); output.RenderBeginTag(HtmlTextWriterTag.A); output.Write(listing.Title); output.RenderEndTag(); }
protected override void GenerateFormattedHeading(HtmlTextWriter output, IListing listing) { output.RenderBeginTag(HtmlTextWriterTag.Strong); if (listing.Title.Contains(Delimiter) && Delimiter != String.Empty) output.Write(listing.Title.Split(Delimiter.ToCharArray())[1]); else output.Write(listing.Title); output.RenderEndTag(); }
public static bool IsBelowAverage(this IListing listing, int average, uint threshold) { var targetPrice = listing.DetermineTargetPrice(average, threshold); if (listing.Price <= targetPrice) { return(true); } return(false); }
private static int DetermineTargetPrice(this IListing listing, int average, uint threshold) { int targetPrice = (int)(average * (1 - (threshold / 100))); if (listing is CardListing && listing.ItemOf.Id != ((CardListing)listing).ItemIn.Id) { targetPrice -= 2000000; } return(targetPrice > 0 ? targetPrice : 0); }
protected override void GenerateFormattedHeading(HtmlTextWriter output, IListing listing) { output.RenderBeginTag(HtmlTextWriterTag.Strong); if (listing.Title.Contains(this.Delimiter) && this.Delimiter != string.Empty) { output.Write(listing.Title.Split(this.Delimiter.ToCharArray())[1]); } else { output.Write(listing.Title); } output.RenderEndTag(); }
protected override void GenerateFormattedListing(HtmlTextWriter output, IListing listing) { output.AddAttribute(HtmlTextWriterAttribute.Href, _relativePath); output.AddAttribute(HtmlTextWriterAttribute.Target, "_blank"); output.RenderBeginTag(HtmlTextWriterTag.A); if (listing.Title.Split(Delimiter.ToCharArray()).Count() == 2 && Delimiter != String.Empty) output.Write(listing.Title.Split(Delimiter.ToCharArray())[0]); else output.Write(listing.Title); output.RenderEndTag(); output.AddAttribute(HtmlTextWriterAttribute.Class, "alignRight"); output.RenderBeginTag(HtmlTextWriterTag.Span); if (listing.Title.Split(Delimiter.ToCharArray()).Count() == 2 && Delimiter != String.Empty) output.Write(listing.Title.Split(Delimiter.ToCharArray())[1]); else output.Write(String.Empty); output.RenderEndTag(); }
protected virtual void GenerateFormattedHeading(HtmlTextWriter output, IListing listing) { output.RenderBeginTag(HtmlTextWriterTag.Strong); output.Write(listing.Title); output.RenderEndTag(); }
public void Add(IListing listing) { _Listings.Add(listing); }
public ListingController(IListing listingService, IWebHostEnvironment env, UserManager <ApartmentsUser> userManager) { _listingService = listingService; _env = env; _userManager = userManager; }
public void Add(IListing listing) { this.listings.Add(listing); }
public ListingController(IListing listingService) { _listingService = listingService; }
public ListingsController(IListing listing, IMapper mapper) { _listingService = listing; _mapper = mapper; }
protected virtual void GenerateFormattedListing(HtmlTextWriter output, IListing listing) { output.AddAttribute(HtmlTextWriterAttribute.Href, _relativePath); output.AddAttribute(HtmlTextWriterAttribute.Target, "_blank"); output.RenderBeginTag(HtmlTextWriterTag.A); output.Write(listing.Title); output.RenderEndTag(); }
public HomeController(IListing listingService) => _listingService = listingService;
public DetailController(IListing listingService) { _listingService = listingService; }