private DataGridViewModel <Dictionary <string, object> > GetDataList(HelpQuery query) { DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >(); if (query != null) { DbQueryResult helpList = ArticleHelper.GetHelpList(query); dataGridViewModel.rows = DataHelper.DataTableToDictionary(helpList.Data); dataGridViewModel.total = helpList.TotalRecords; foreach (Dictionary <string, object> row in dataGridViewModel.rows) { } } return(dataGridViewModel); }
private void BindSearch() { HelpQuery helpQuery = new HelpQuery(); helpQuery.StartArticleTime = this.startTime; helpQuery.EndArticleTime = this.endTime; helpQuery.Keywords = Globals.HtmlEncode(this.keywords); helpQuery.CategoryId = this.categoryId; helpQuery.PageIndex = this.pager.PageIndex; helpQuery.PageSize = this.pager.PageSize; helpQuery.SortBy = "AddedDate"; helpQuery.SortOrder = SortAction.Desc; DbQueryResult helpList = ArticleHelper.GetHelpList(helpQuery); this.grdHelpList.DataSource = helpList.Data; this.grdHelpList.DataBind(); this.pager.TotalRecords = helpList.TotalRecords; this.pager1.TotalRecords = helpList.TotalRecords; }
private void BindSearch() { DbQueryResult helpList = ArticleHelper.GetHelpList(new HelpQuery { StartArticleTime = this.startTime, EndArticleTime = this.endTime, Keywords = Globals.HtmlEncode(this.keywords), CategoryId = this.categoryId, PageIndex = this.pager.PageIndex, PageSize = this.pager.PageSize, SortBy = "AddedDate", SortOrder = SortAction.Desc }); this.grdHelpList.DataSource = helpList.Data; this.grdHelpList.DataBind(); this.pager.TotalRecords = helpList.TotalRecords; this.pager1.TotalRecords = helpList.TotalRecords; }
private void BindSearch() { HelpQuery helpQuery = new HelpQuery(); helpQuery.StartArticleTime = startTime; helpQuery.EndArticleTime = endTime; helpQuery.Keywords = Globals.HtmlEncode(keywords); helpQuery.CategoryId = categoryId; helpQuery.PageIndex = pager.PageIndex; helpQuery.PageSize = pager.PageSize; helpQuery.SortBy = grdHelpList.SortOrderBy; helpQuery.SortOrder = SortAction.Desc; DbQueryResult helpList = ArticleHelper.GetHelpList(helpQuery); grdHelpList.DataSource = helpList.Data; grdHelpList.DataBind(); pager.TotalRecords = helpList.TotalRecords; pager1.TotalRecords = helpList.TotalRecords; }