using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Web; namespace FotosayMall.MVC.Models { public class SearchModel { /// <summary> /// 原始图片文件夹(用于url地址) /// </summary> private const string OriginImagesUrlFolder = "userimages/photos_origin"; /// <summary> /// 购买页链接 /// </summary> public string Url { get; set; } /// <summary> /// 所属域名(1为fotosay,2为img,3为img1) /// </summary> public int PhotoFilePathFlag { get; set; } /// <summary> /// 图片名称 /// </summary> public string PhotoFileName { get; set; } /// <summary> /// 商品名称 /// </summary> public string Title { get; set; } /// <summary> /// 作者所在省份 /// </summary> public string Province { get; set; } /// <summary> /// 作者 /// </summary> public string Author { get; set; } /// <summary> /// 创作年份 /// </summary> public string Year { get; set; } /// <summary> /// 图片:单次价格 /// </summary> public decimal UsingPrice { get; set; } /// <summary> /// 实物:定价 /// </summary> public decimal SalePrice { get; set; } /// <summary> /// 售价 /// </summary> public string Price { get { if (this.UsingPrice > 0) return this.UsingPrice.ToString(); else if (this.SalePrice > 0) return this.SalePrice.ToString(); else return "议价"; } } /// <summary> /// /// </summary> private string MasterSite { get { return ConfigurationManager.AppSettings["masterSite"].ToString(); } } /// <summary> /// 图片完整路径 /// </summary> public string Img { get { return MasterSite + "https://www.jb51.net/" + OriginImagesUrlFolder + this.PhotoFileName + "b.jpg"; } } } }
更多关于asp.net相关内容感兴趣的读者可查看本站专题:《asp.net优化技巧总结》、《asp.net字符串操作技巧汇总》、《asp.net操作XML技巧总结》、《asp.net文件操作技巧汇总》、《asp.net ajax技巧总结专题》及《asp.net缓存操作技巧总结》。