日期:2014-05-17 浏览次数:20405 次
public static PagedList<LibAlbumDoc> GetPagedLibAlbDoc(int albumId,int typeId, string title, string content, int pageIndex, int pageSize, bool showAll)
{
using (var db = new WEBVODEntities())
{
var qry = db.LibAlbumDoc.AsQueryable();
qry = qry.Where(a => a.AlbumId == albumId).OrderByDescending(a => a.PubDate);
PagedList<LibAlbumDoc> pl = qry.ToPagedList(pageIndex, pageSize);
foreach (var libAlbDoc in pl)
{
libAlbDoc.Title = libAlbDoc.Library.Title;
libAlbDoc.CategoryCN = libAlbDoc.Library.VideoCategories.Name;
libAlbDoc.Approved = libAlbDoc.Library.Approved;
}
return pl;
}
}