private void ViewCateNews(int group) { ddlCateNews.Items.Clear(); CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.GetCateGroupRoles(Language.language, group, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToDropDown(ddlCateNews, table, "", "", "CateNewsName", "CateNewsID", ""); }
private void ViewCateDownload() { int group = 1; ddlCateDownload.Items.Clear(); CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.GetCateGroupRoles(Language.language, group, Session["Admin_UserName"].ToString()); DataView view = new DataView(table); view.RowFilter = "ParentNewsID=0"; table = view.ToTable(); commonBSO commonBSO = new commonBSO(); commonBSO.FillToDropDown(ddlCateDownload, table, "", "", "CateNewsName", "CateNewsID", ""); }
private string GetCateParentIDArrayByID() { string strArrayID = ""; CateNewsBSO cateNewsBSO = new CateNewsBSO(); DataTable table1 = cateNewsBSO.GetCateGroupRoles(Language.language, 1, Session["Admin_UserName"].ToString()); if (table1.Rows.Count > 0) { foreach (DataRow subrow in table1.Rows) { strArrayID += subrow["CateNewsID"].ToString() + ","; } } return strArrayID; }
private void ViewCateCompany(int group) { //ddlCategories.Items.Clear(); //CateNewsBSO catenewsBSO = new CateNewsBSO(); //DataTable table = catenewsBSO.GetCateNews(Language.language); //DataView dataView = new DataView(table); //dataView.RowFilter = "GroupCate = 2"; //ddlCategories.DataSource = dataView; //ddlCategories.DataTextField = "CateNewsName"; //ddlCategories.DataValueField = "CateNewsID"; //ddlCategories.DataBind(); //int group = 2; ddlCategories.Items.Clear(); CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.GetCateGroupRoles(Language.language, group, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToDropDown(ddlCategories, table, "", "", "CateNewsName", "CateNewsID", ""); }
//#region BindCateSearch //private void BindCateSearch() //{ // ddlCateNewsSearch.Items.Clear(); // CateNewsBSO catenewsBSO = new CateNewsBSO(); // DataTable table = catenewsBSO.GetCateNews(Language.language); // DataView dataView = new DataView(table); // dataView.RowFilter = "GroupCate = 4"; // ddlCateNewsSearch.DataSource = dataView; // ddlCateNewsSearch.DataTextField = "CateNewsName"; // ddlCateNewsSearch.DataValueField = "CateNewsID"; // ddlCateNewsSearch.Items.Add(new ListItem("~~~ Trong tat ca ~~~", "0")); // ddlCateNewsSearch.DataBind(); //} //#endregion #region BindCateSearch private void BindCateSearch(int group) { ddlCateNewsSearch.Items.Clear(); CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.GetCateGroupRoles(Language.language, group, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToDropDown(ddlCateNewsSearch, table, "~~ Trong tất cả ~~", "0", "CateNewsName", "CateNewsID", ""); }
private string GetCateParentIdArrayById(int group) { string strArrayId = ""; var cateNewsBSO = new CateNewsBSO(); var table1 = cateNewsBSO.GetCateGroupRoles(Language.language, group, Session["Admin_UserName"].ToString()); if (table1.Rows.Count > 0) { foreach (DataRow subrow in table1.Rows) { strArrayId += subrow["CateNewsID"].ToString() + ","; // strArrayID += GetCateParentIDArrayByID(Convert.ToInt32(subrow["CateNewsID"].ToString())); } } return strArrayId; }
private void BindCateSearch(int group) { ddlCateDownloadSearch.Items.Clear(); CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.GetCateGroupRoles(Language.language, group, Session["Admin_UserName"].ToString()); DataView view = new DataView(table); view.RowFilter = "ParentNewsID=0"; table = view.ToTable(); commonBSO commonBSO = new commonBSO(); commonBSO.FillToDropDown(ddlCateDownloadSearch, table, "~~ Trong tất cả ~~", "0", "CateNewsName", "CateNewsID", ""); }
protected void BindToCateNews(int _group) { ddlCateNews.Items.Clear(); CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.GetCateGroupRoles(Language.language, _group, Session["Admin_UserName"].ToString()); ddlCateNews.DataTextField = "CateNewsName"; ddlCateNews.DataValueField = "CateNewsID"; ddlCateNews.DataSource = table; ddlCateNews.DataBind(); if (table.Rows.Count > 0) { ddlCateNews.SelectedValue = table.Rows[0]["CateNewsID"].ToString(); } }