/// <summary> /// 获取店铺广告图片 /// </summary> /// <returns></returns> public ShopActivityImageInfo SelectShopActivityImageInfo(int shopActivityImageType) { var result = _shopActivityImageDal.SelectShopActivityImageInfo(); if (result != null && result.Count > 0) { var tempInfo = result.FirstOrDefault(ent => ent.ShopActivityImageType == shopActivityImageType); if (tempInfo != null && !string.IsNullOrWhiteSpace(tempInfo.ShopActivityImage)) { return(tempInfo); } } return(null); }
/// <summary>页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var list = _activityImageDalWrite.SelectShopActivityImageInfo(); if (list.Count <= 0) { return; } //网站 var web = list.FirstOrDefault(ent => ent.ShopActivityImageType == (int)ShopActivityImageType.Web); if (web != null && !string.IsNullOrWhiteSpace(web.ShopActivityImage)) { Editor_DescriptionWeb.Content = web.ShopActivityImage; } //手机 var phone = list.FirstOrDefault(ent => ent.ShopActivityImageType == (int)ShopActivityImageType.Phone); if (phone != null && !string.IsNullOrWhiteSpace(phone.ShopActivityImage)) { Editor_DescriptionPhone.Content = phone.ShopActivityImage; } } }