using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web
{
    public partial class mainMenu_PHTGL : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }
        /// 
        /// 
        /// 
        public string swiperHtml;
        #region 项目图片
        /// 
        /// 项目图片显示
        /// 
        public void ProjectPic()
        {
            swiperHtml = " ";
            var getP = from x in Funs.DB.InformationProject_Picture
                       join y in Funs.DB.AttachFile on x.PictureId equals y.ToKeyId
                       where y.AttachFileId != null && y.AttachUrl != null
                       select new { x.ProjectId, x.UploadDate, y.AttachUrl };
            if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
            {
                getP = getP.Where(x => x.ProjectId == this.CurrUser.LoginProjectId);
            }
            var getList = getP.OrderByDescending(x => x.UploadDate).Take(5).ToList();
            if (getList.Count() > 0)
            {
                foreach (var item in getList)
                {
                    var geturl = Funs.GetStrListByStr(item.AttachUrl, ',');
                    foreach (var itemurl in geturl)
                    {
                        if (!string.IsNullOrEmpty(itemurl))
                        {
                            swiperHtml += @"
                                                                  
                            ![]() 
                            
                             ";
                        }
                    }
                }
            }
            else
            {
                swiperHtml += @"                                                                  
                            ![]() 
                            
                             ";
            }
        }
        #endregion
    }
}