private void BindHelpCategory() { IList <HelpCategoryInfo> helpCategorys = ArticleHelper.GetHelpCategorys(); grdHelpCategories.DataSource = helpCategorys; grdHelpCategories.DataBind(); }
public override void DataBind() { this.Items.Clear(); base.Items.Add(new ListItem(this.NullToDisplay, string.Empty)); foreach (HelpCategoryInfo info in ArticleHelper.GetHelpCategorys()) { this.Items.Add(new ListItem(Globals.HtmlDecode(info.Name), info.CategoryId.Value.ToString())); } }
public override void DataBind() { this.Items.Clear(); base.Items.Add(new ListItem(this.NullToDisplay, string.Empty)); IList <HelpCategoryInfo> helpCategorys = ArticleHelper.GetHelpCategorys(); foreach (HelpCategoryInfo current in helpCategorys) { this.Items.Add(new ListItem(Globals.HtmlDecode(current.Name), current.CategoryId.Value.ToString())); } }
private DataGridViewModel <HelpCategoryInfo> GetDataList() { DataGridViewModel <HelpCategoryInfo> dataGridViewModel = new DataGridViewModel <HelpCategoryInfo>(); IList <HelpCategoryInfo> helpCategorys = ArticleHelper.GetHelpCategorys(); dataGridViewModel.rows = helpCategorys.ToList(); dataGridViewModel.total = helpCategorys.Count; foreach (HelpCategoryInfo row in dataGridViewModel.rows) { if (string.IsNullOrEmpty(row.IconUrl)) { row.IconUrl = HiContext.Current.SiteSettings.DefaultProductImage; } } return(dataGridViewModel); }
private void BindHelpCategory() { System.Collections.Generic.IList <HelpCategoryInfo> helpCategorys = ArticleHelper.GetHelpCategorys(); this.grdHelpCategories.DataSource = helpCategorys; this.grdHelpCategories.DataBind(); }