public override void LoadSettings() { zClass ob = new zClass(); DataTable dt = ob.GET_CAT_LIST(""); DataRow dr = dt.NewRow(); dr[0] = "HOT"; dr[1] = "Tin nổi bật"; dt.Rows.InsertAt(dr, 0); dr = dt.NewRow(); dr[0] = "VIEW"; dr[1] = "Tin đọc nhiều"; dt.Rows.InsertAt(dr, 0); dr = dt.NewRow(); dr[0] = "NEW"; dr[1] = "Tin mới nhất"; dt.Rows.InsertAt(dr, 0); DropDownList1.DataSource = dt; DropDownList1.DataTextField = "CatName"; DropDownList1.DataValueField = "CatID"; DropDownList1.DataBind(); DropDownList2.DataSource = dt; DropDownList2.DataTextField = "CatName"; DropDownList2.DataValueField = "CatID"; DropDownList2.DataBind(); try { if (ModuleSettings["Nguon"] != null) DropDownList1.SelectedValue = ModuleSettings["Nguon"].ToString(); if (ModuleSettings["TieuDe"] != null) TextBox1.Text = ModuleSettings["TieuDe"].ToString(); if (ModuleSettings["NguonPhai"] != null) DropDownList2.SelectedValue = ModuleSettings["NguonPhai"].ToString(); if (ModuleSettings["TieuDePhai"] != null) TextBox2.Text = ModuleSettings["TieuDePhai"].ToString(); } catch { } }
public override void LoadSettings() { zClass ob = new zClass(); DataTable dt = ob.GET_CAT_LIST(""); DataRow dr = dt.NewRow(); dr[0] = "ALL"; dr[1] = "All News - Tất cả tin bài"; dt.Rows.InsertAt(dr, 0); DropDownList1.DataSource = dt; DropDownList1.DataTextField = "CatName"; DropDownList1.DataValueField = "CatID"; DropDownList1.DataBind(); try { if (ModuleSettings["Nguon"] != null) DropDownList1.SelectedValue = ModuleSettings["Nguon"].ToString(); if (ModuleSettings["TuyChon"] != null) RadioButtonList1.SelectedValue = ModuleSettings["TuyChon"].ToString(); } catch { } }