0813
This commit is contained in:
@@ -4,14 +4,63 @@ 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 : System.Web.UI.Page
|
||||
public partial class mainMenu_PHTGL : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string swiperHtml;
|
||||
|
||||
#region 项目图片
|
||||
/// <summary>
|
||||
/// 项目图片显示
|
||||
/// </summary>
|
||||
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 += @"<div class='swiper-slide'>
|
||||
<img data-src='../" + itemurl + @"' class='swiper-lazy'>
|
||||
<div class='swiper-lazy-preloader swiper-lazy-preloader-white'></div>
|
||||
</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
swiperHtml += @"<div class='swiper-slide'>
|
||||
<img data-src='../images/Test_Null.jpg' class='swiper-lazy'>
|
||||
<div class='swiper-lazy-preloader swiper-lazy-preloader-white'></div>
|
||||
</div>";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user