Example #1
0
        protected void GetScenicImg()
        {
            IList <MScenicImg> list = BScenicImg.CreateInstance().GetList(4);

            if (list != null && list.Count > 0)
            {
                rpt_ScenicImg.DataSource = list;
                rpt_ScenicImg.DataBind();
            }
        }
Example #2
0
        /// <summary>
        /// 景区美图美景
        /// </summary>
        /// <param name="Id">景区自增编号</param>
        protected void ScenicImg(long Id)
        {
            IList <MScenicImg> list = BScenicImg.CreateInstance().GetList(Id);

            if (list != null && list.Count > 0)
            {
                rpt_ScenicImg.DataSource = list;
                rpt_ScenicImg.DataBind();
                //景区形象图片
                var img = from c in list where c.ImgType == ScenicImgType.景区形象 select c;
                if (img != null && img.Count() > 0)
                {
                    imgScenicImg.Src = Utils.GetNewImgUrl(img.ToList()[0].ThumbAddress, 3);
                    imgScenicImg.Alt = img.ToList()[0].ScenicName;
                    hrefImg.HRef     = Utils.GetNewImgUrl(img.ToList()[0].Address, 3);
                    hrefImg.Title    = img.ToList()[0].ScenicName;
                }
            }
            else
            {
                imgScenicImg.Src = Utils.GetNewImgUrl(string.Empty, 3);
            }
        }