/// <summary> /// 绑定列表 /// </summary> private void BindDataList() { QueryParam qp = new QueryParam(); qp.OrderType = OrderType; if (!String.IsNullOrEmpty(Orderfld)) { qp.Orderfld = Orderfld; } else { qp.Orderfld = DNNGo_LayerGallery_Files._.ID; } #region "分页的一系列代码" int RecordCount = 0; int pagesize = qp.PageSize = 10; qp.PageIndex = PageIndex; #endregion //查询的方法 qp.Where = BindSearch(); List <DNNGo_LayerGallery_Files> Comments = DNNGo_LayerGallery_Files.FindAll(qp, out RecordCount); qp.RecordCount = RecordCount; RecordPages = qp.Pages; lblRecordCount.Text = String.Format("{0} {2} / {1} {3}", RecordCount, RecordPages, ViewResourceText("Title_Items", "Items"), ViewResourceText("Title_Pages", "Pages")); Int32 ByPortalID = Settings_PortalID; hlFileMateAll.Text = String.Format("{1} ({0})", DNNGo_LayerGallery_Files.FindCountByType(ByPortalID, -1), ViewResourceText("hlFileMateAll", "All")); hlFileMateImage.Text = String.Format("{1} ({0})", DNNGo_LayerGallery_Files.FindCountByType(ByPortalID, (Int32)EnumFileMate.Image), ViewResourceText("hlFileMateImage", "Image")); hlFileMateZip.Text = String.Format("{1} ({0})", DNNGo_LayerGallery_Files.FindCountByType(ByPortalID, (Int32)EnumFileMate.Zip), ViewResourceText("hlFileMateZip", "Zip")); hlFileMateVideo.Text = String.Format("{1} ({0})", DNNGo_LayerGallery_Files.FindCountByType(ByPortalID, (Int32)EnumFileMate.Video), ViewResourceText("hlFileMateVideo", "Video")); hlFileMateDoc.Text = String.Format("{1} ({0})", DNNGo_LayerGallery_Files.FindCountByType(ByPortalID, (Int32)EnumFileMate.Doc), ViewResourceText("hlFileMateDoc", "Doc")); //ctlPagingControl.TotalRecords = RecordCount; //if (RecordCount <= pagesize) //{ // ctlPagingControl.Visible = false; //} gvCommentList.DataSource = Comments; gvCommentList.DataBind(); BindGridViewEmpty <DNNGo_LayerGallery_Files>(gvCommentList, new DNNGo_LayerGallery_Files()); }
/// <summary> /// 绑定列表 /// </summary> private void BindDataList() { QueryParam qp = new QueryParam(); qp.OrderType = OrderType; if (!String.IsNullOrEmpty(Orderfld)) { qp.Orderfld = Orderfld; } else { qp.Orderfld = DNNGo_LayerGallery_Files._.ID; } #region "分页的一系列代码" int RecordCount = 0; int pagesize = qp.PageSize = 10; qp.PageIndex = PageIndex; #endregion //查询的方法 qp.Where = BindSearch(); List <DNNGo_LayerGallery_Files> Articles = DNNGo_LayerGallery_Files.FindAll(qp, out RecordCount); qp.RecordCount = RecordCount; RecordPages = qp.Pages; lblRecordCount.Text = String.Format("{0} {2} / {1} {3}", RecordCount, RecordPages, ViewResourceText("Title_Items", "Items"), ViewResourceText("Title_Pages", "Pages")); //ctlPagingControl.TotalRecords = RecordCount; //if (RecordCount <= pagesize) //{ // ctlPagingControl.Visible = false; //} gvArticleList.DataSource = Articles; gvArticleList.DataBind(); BindGridViewEmpty <DNNGo_LayerGallery_Files>(gvArticleList, new DNNGo_LayerGallery_Files()); }