private void BindSearch() { DbQueryResult articleList = ArticleHelper.GetArticleList(new ArticleQuery { StartArticleTime = this.startArticleTime, EndArticleTime = this.endArticleTime, Keywords = Globals.HtmlEncode(this.keywords), CategoryId = this.categoryId, PageIndex = this.pager.PageIndex, PageSize = this.pager.PageSize, SortBy = this.grdArticleList.SortOrderBy, SortOrder = SortAction.Desc }); this.grdArticleList.DataSource = articleList.Data; this.grdArticleList.DataBind(); this.pager.TotalRecords = articleList.TotalRecords; this.pager1.TotalRecords = articleList.TotalRecords; }
private void BindSearch() { ArticleQuery articleQuery = new ArticleQuery(); articleQuery.StartArticleTime = this.startArticleTime; articleQuery.EndArticleTime = this.endArticleTime; articleQuery.Keywords = Globals.HtmlEncode(this.keywords); articleQuery.CategoryId = this.categoryId; articleQuery.PageIndex = this.pager.PageIndex; articleQuery.PageSize = this.pager.PageSize; articleQuery.SortBy = this.grdArticleList.SortOrderBy; articleQuery.SortOrder = SortAction.Desc; DbQueryResult articleList = ArticleHelper.GetArticleList(articleQuery); this.grdArticleList.DataSource = articleList.Data; this.grdArticleList.DataBind(); this.pager.TotalRecords = articleList.TotalRecords; this.pager1.TotalRecords = articleList.TotalRecords; }
private DataGridViewModel <Dictionary <string, object> > GetDataList(ArticleQuery query) { DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >(); if (query != null) { DbQueryResult articleList = ArticleHelper.GetArticleList(query); dataGridViewModel.rows = DataHelper.DataTableToDictionary(articleList.Data); dataGridViewModel.total = articleList.TotalRecords; foreach (Dictionary <string, object> row in dataGridViewModel.rows) { if (string.IsNullOrEmpty(row["IconUrl"].ToString())) { row.Add("IconUrls", HiContext.Current.SiteSettings.DefaultProductImage); } else { row.Add("IconUrls", row["IconUrl"]); } } } return(dataGridViewModel); }
public DbQueryResult GetGraphicesTable(HttpContext context) { return(ArticleHelper.GetArticleList(this.GetGraphiceSearch(context))); }