protected void BindToCateNewsGroup() { DataTable datatable = new DataTable(); CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); datatable = _catenewsgroupBSO.GetCateNewsGroupNewAll(Language.language, Session["Admin_UserName"].ToString()); ddlCateNewsGroup.DataTextField = "CateNewsGroupName"; ddlCateNewsGroup.DataValueField = "GroupCate"; ddlCateNewsGroup.DataSource = datatable; ddlCateNewsGroup.DataBind(); ddlCateNewsGroup.SelectedValue = datatable.Rows[0]["GroupCate"].ToString(); BindToCateNews(Convert.ToInt32(datatable.Rows[0]["GroupCate"].ToString())); lboGroupCate.DataTextField = "CateNewsGroupName"; lboGroupCate.DataValueField = "GroupCate"; lboGroupCate.DataSource = datatable; lboGroupCate.DataBind(); if (datatable.Rows.Count > 0) { lboGroupCate.SelectedValue = datatable.Rows[0]["GroupCate"].ToString(); } }
protected void grvCateNewsGroup_RowCommand(object sender, GridViewCommandEventArgs e) { int Id = Convert.ToInt32(e.CommandArgument.ToString()); CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); CateNewsGroup _catenewgroup = catenewsGroupBSO.GetCateNewsGroupById(Id); string nName = e.CommandName.ToLower(); switch (nName) { case "rules": Response.Redirect("~/Admin/editcatenewsgrouproles/" + Id + "/Default.aspx"); break; case "_edit": Response.Redirect("~/Admin/editcatenewsgroup/" + Id + "/Default.aspx"); break; case "_listcate": Response.Redirect("~/Admin/Group/listcatenews/" + _catenewgroup.GroupCate + "/Default.aspx"); break; case "_delete": catenewsGroupBSO.DeleteCateNewsGroup(Id); ViewCateGroup(); AspNetCache.Reset(); break; } }
protected void btn_slug_click(object sender, EventArgs e) { NewsGroupBSO newsGroupBSO = new NewsGroupBSO(); CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); CateNewsBSO _catenewsBSO = new CateNewsBSO(); NewsGroup newsGroup = new NewsGroup(); DataTable table = newsGroupBSO.GetNewsGroupAll(Language.language); if (table.Rows.Count > 0) { for (int i = 0; i < table.Rows.Count; i++) { newsGroup = newsGroupBSO.GetNewsGroupById(Convert.ToInt32(table.Rows[i]["NewsGroupID"].ToString())); newsGroup.Slug = GetString(newsGroup.Title); newsGroup.Tags = _catenewsBSO.GetCateNewsById(newsGroup.CateNewsID).CateNewsName.Replace(",", ""); newsGroup.Tags += "," + _catenewsgroupBSO.GetCateNewsGroupByGroupCate(newsGroup.GroupCate, Language.language).CateNewsGroupName.Replace(",", ""); newsGroup.Keyword = _catenewsBSO.GetCateNewsById(newsGroup.CateNewsID).CateNewsName.Replace(",", ""); newsGroup.Keyword += "," + _catenewsgroupBSO.GetCateNewsGroupByGroupCate(newsGroup.GroupCate, Language.language).CateNewsGroupName.Replace(",", ""); newsGroupBSO.UpdateNewsGroup(newsGroup); } clientview.Text = "Xử lý OK"; ViewNewsGroup(-1); } }
private string BindMenuCateGroup(string strMenuSub, int iCate, string lang, int group, int cId, string keyword) { CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.getCateClientGroupUrl(iCate, lang, group, true); CateNewsGroupBSO cateNewsgroupBSO = new CateNewsGroupBSO(); CateNewsGroup catenewsgroup = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(group, lang); if (catenewsgroup != null) { if (table.Rows.Count > 0) { strMenuSub += "<ul class='list-inline tags-v2 margin-bottom-20'>"; foreach (DataRow dataRow in table.Rows) { strMenuSub += "<li>"; if (!Convert.ToBoolean(dataRow["isUrl"].ToString())) { if (!String.IsNullOrEmpty(keyword) && keyword.Trim() != "" && keyword.Trim() != "search") { strMenuSub += "<a href='" + ResolveUrl("~/") + "tim-kiem/" + dataRow["GroupCate"] + "/" + dataRow["CateNewsID"].ToString() + "/" + GetString(keyword) + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSub += "<a href='" + ResolveUrl("~/") + "tim-kiem/" + dataRow["GroupCate"] + "/" + dataRow["CateNewsID"].ToString() + "/search.aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; } } strMenuSub += "</li>"; //strMenuSub += GetSubCategoryMenuCateGroup("", Convert.ToInt32(dataRow["CateNewsID"].ToString()), lang, group); } strMenuSub += "</ul>"; } } return(strMenuSub); }
private string BindMenuCateGroupAll(string strMenuSub, string lang, int gID, int cId, string keyword) { CateNewsGroupBSO catnewsgroupBSO = new CateNewsGroupBSO(); DataTable table = catnewsgroupBSO.GetCateNewsGroupMenuAll(lang); //string strClass = ""; if (table.Rows.Count > 0) { foreach (DataRow dataRow in table.Rows) { strMenuSub += "<div class='headline-v2 bg-color-light'><h2>"; if (!Convert.ToBoolean(dataRow["isUrl"].ToString())) { if (!String.IsNullOrEmpty(keyword) && keyword.Trim() != "" && keyword.Trim() != "search") { strMenuSub += "<a href='" + ResolveUrl("~/") + "tim-kiem/" + dataRow["GroupCate"].ToString() + "/" + GetString(keyword) + ".aspx'>" + dataRow["CateNewsGroupName"].ToString() + "</a>"; } else { strMenuSub += "<a href='" + ResolveUrl("~/") + "tim-kiem/" + dataRow["GroupCate"].ToString() + "/search.aspx'>" + dataRow["CateNewsGroupName"].ToString() + "</a>"; } } strMenuSub += "</h2></div>"; strMenuSub += BindMenuCateGroup("", 0, lang, Convert.ToInt32(dataRow["GroupCate"].ToString()), cId, keyword); } //strMenuSub += "</ul>"; } return(strMenuSub); }
private string GetSubCategoryMenuCateGroup(string strMenuSub, int iCate, string lang, int group) { CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable datatable = catenewsBSO.getCateClientGroupUrl(iCate, lang, group, true); CateNewsGroupBSO cateNewsgroupBSO = new CateNewsGroupBSO(); CateNewsGroup catenewsgroup = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(group, lang); if (datatable.Rows.Count > 0) { strMenuSub += "<ul>"; foreach (DataRow dataRow in datatable.Rows) { strMenuSub += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSub += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; } //else if (catenewsgroup.IsPage) // strMenuSub += "<a href='" + ResolveUrl("~/") + "tin-tuc-dmp/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; else { strMenuSub += "<a href='" + ResolveUrl("~/") + "c3/" + catenewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow["CateNewsID"].ToString())) + "/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSub += GetSubCategoryMenuCateGroup("", Convert.ToInt32(dataRow["CateNewsID"].ToString()), lang, group); strMenuSub += "</li>"; } strMenuSub += "</ul>"; } return(strMenuSub); }
protected void viewMenu() { if (AspNetCache.CheckCache("HTML_ltlMenuTextLinkFooter_11" + "_" + Language.language.Replace("-", "_")) == false) { string strMenuSubCate = ""; CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); CateNewsBSO _catenewsBSO = new CateNewsBSO(); DataTable table_cate_group = _catenewsgroupBSO.GetCateNewsGroupHomeAll(Language.language); if (table_cate_group.Rows.Count > 0) { //int col = 0; strMenuSubCate += "<ul class='list-unstyled link-list'>"; for (int i = 0; i < table_cate_group.Rows.Count; i++) { DataRow dataRow = table_cate_group.Rows[i]; //col++; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["ShortName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "c2/" + _catenewsgroupBSO.GetSlugById(Convert.ToInt32(dataRow["CateNewsGroupID"])) + "/" + GetString(dataRow["CateNewsGroupName"]) + "-" + dataRow["GroupCate"] + ".aspx'>" + dataRow["ShortName"].ToString() + "</a><i class='fa fa-angle-right'></i>"; } strMenuSubCate += "</li>"; //DataTable table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, Convert.ToInt32(dataRow["GroupCate"].ToString()), 6); //if (table_cate.Rows.Count > 0) //{ // strMenuSubCate += "<ul class='list-unstyled simple-list margin-bottom-20'>"; // for (int j = 0; j < table_cate.Rows.Count; j++) // { // DataRow dataRow1 = table_cate.Rows[j]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow1["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow1["Url"].ToString() + "'>" + dataRow1["ShortName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "c3/"+ _catenewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow1["CateNewsID"])) + "/" + GetString(dataRow1["CateNewsName"]) + "-" + dataRow1["GroupCate"] + "-" + dataRow1["CateNewsID"] + ".aspx'>" + dataRow1["ShortName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // strMenuSubCate += "</ul>"; //} } strMenuSubCate += "</ul>"; } AspNetCache.SetCacheWithTime("HTML_ltlMenuTextLinkFooter_11" + "_" + Language.language.Replace("-", "_"), strMenuSubCate, 150); ltlTextLinkMenu.Text = strMenuSubCate; } else { ltlTextLinkMenu.Text = (string)AspNetCache.GetCache("HTML_ltlMenuTextLinkFooter_11" + "_" + Language.language.Replace("-", "_")); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int groupcate = 0; if (!String.IsNullOrEmpty(hddValue.Value)) { if (int.TryParse(hddValue.Value.Replace(",", ""), out groupcate)) { ViewNewsHot(groupcate); if (AspNetCache.CheckCache("HTML_ltlTitle_mainhome_news_by_group_list_" + hddValue.Value + "_" + Language.language.Replace("-", "_")) == false) { CateNewsGroupBSO cateNewsgroupBSO = new CateNewsGroupBSO(); CateNewsGroup cateNewGroup = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(groupcate, Language.language); string strTitle = ""; if (cateNewGroup != null) { strTitle = "<a href='" + ResolveUrl("~/") + "c2/" + cateNewsgroupBSO.GetSlugById(cateNewGroup.CateNewsGroupID) + "/" + GetString(cateNewGroup.CateNewsGroupName) + "-" + groupcate + ".aspx' title='" + cateNewGroup.CateNewsGroupName + "'>" + cateNewGroup.CateNewsGroupName + "</a>"; } AspNetCache.SetCacheWithTime("HTML_ltlTitle_mainhome_news_by_group_list_" + hddValue.Value + "_" + Language.language.Replace("-", "_"), strTitle, 150); ltlTitle.Text = strTitle; } else { ltlTitle.Text = (string)AspNetCache.GetCache("HTML_ltlTitle_mainhome_news_by_group_list_" + hddValue.Value + "_" + Language.language.Replace("-", "_")); } } } } }
private void ViewCateGroup() { CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); DataTable table = catenewsGroupBSO.GetCateNewsGroupAll(Language.language, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToGridView(grvCateNewsGroup, table); }
private void ViewCateAll() { CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); DataTable table = catenewsGroupBSO.GetCateNewsGroupAll(Language.language, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToCheckBoxList(chkListCate, table, "CateNewsGroupName", "CateNewsGroupID"); }
protected void Bind_GroupCate() { DataTable datatable = new DataTable(); CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); datatable = _catenewsgroupBSO.GetCateNewsGroupNewAll(Language.language, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToCheckBoxList(chkCateNews, datatable, "CateNewsGroupName", "GroupCate"); }
private string BindMenuCateGroupAll(string strMenuSub, string lang, int gID) { CateNewsGroupBSO catnewsgroupBSO = new CateNewsGroupBSO(); DataTable table = catnewsgroupBSO.GetCateNewsGroupMenuAll(lang); string strClass = ""; if (table.Rows.Count > 0) { strMenuSub += "<ul>"; //if (gID==0) //{ // strClass = "<li class='selected'>"; //} //else // strClass = "<li>"; //strMenuSub += strClass; //strMenuSub += "<a href='" + ResolveUrl("~/") + "' title='" + Resources.resource.T_home + "'>" + Resources.resource.T_home + "</a>"; //strMenuSub += "</a>"; //strMenuSub += "</li>"; foreach (DataRow dataRow in table.Rows) { if (Convert.ToInt32(dataRow["GroupCate"].ToString()) == gID) { strClass = "class='selected'"; } else { strClass = ""; } strMenuSub += "<li " + strClass + ">"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSub += "<a href='" + dataRow["Url"].ToString() + "' " + strClass + " >" + dataRow["CateNewsGroupName"].ToString() + "</a>"; } //else if (Convert.ToBoolean(dataRow["IsPage"].ToString())) // strMenuSub += "<a href='" + ResolveUrl("~/") + "tin-tuc-fp/" + GetString(dataRow["CateNewsGroupName"]) + "-" + dataRow["GroupCate"] + ".aspx' "+strClass+" >" + dataRow["CateNewsGroupName"].ToString() + "</a>"; else { strMenuSub += "<a href='" + ResolveUrl("~/") + "c2/" + catnewsgroupBSO.GetSlugById(Convert.ToInt32(dataRow["CateNewsGroupID"])) + "/" + GetString(dataRow["CateNewsGroupName"]) + "-" + dataRow["GroupCate"] + ".aspx' " + strClass + " >" + dataRow["CateNewsGroupName"].ToString() + "</a>"; } strMenuSub += BindMenuCateGroup("", 0, lang, Convert.ToInt32(dataRow["GroupCate"].ToString())); strMenuSub += "</li>"; } strMenuSub += "</ul>"; } return(strMenuSub); }
protected void Bind_GroupCate() { DataTable datatable = new DataTable(); CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); datatable = _catenewsgroupBSO.GetCateNewsGroupNewAll(Language.language, Session["Admin_UserName"].ToString()); lboGroupCate.DataTextField = "CateNewsGroupName"; lboGroupCate.DataValueField = "GroupCate"; lboGroupCate.DataSource = datatable; lboGroupCate.DataBind(); //lboGroupCate.SelectedValue = datatable.Rows[0]["GroupCate"].ToString(); }
private void BindControl() { ddlCateNewsSearch.Items.Clear(); CateNewsGroupBSO categroupBSO = new CateNewsGroupBSO(); DataTable table = categroupBSO.GetCateNewsGroupNewAll(Language.language, Session["Admin_Username"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToDropDown(ddlGroupCate, table, "~~ Trong tất cả ~~", "0", "CateNewsGroupName", "GroupCate", ""); ddlType.Items.Clear(); ddlType.Items.Add(new ListItem("--All--", "0")); ddlType.Items.Add(new ListItem("Tiêu đề", "1")); ddlType.Items.Add(new ListItem("Tin vắn", "2")); ddlType.SelectedValue = "1"; }
protected void btn_Order_Click(object sender, EventArgs e) { foreach (GridViewRow row in grvCateNewsGroup.Rows) { TextBox textOrder = (TextBox)row.FindControl("txtOrder"); TextBox textMenu = (TextBox)row.FindControl("txtMenu"); int cOrder = Convert.ToInt32(textOrder.Text); int _menu = Convert.ToInt32(textMenu.Text); int cateID = Convert.ToInt32(row.Cells[0].Text); CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); catenewsGroupBSO.CateNewsGroupUpOrder(cateID, cOrder); catenewsGroupBSO.CateNewsGroupUpMenu(cateID, _menu); } ViewCateGroup(); error.Text = "<div class='alert alert-sm alert-danger bg-gradient'>Cập nhật thành công !</div>"; AspNetCache.Reset(); }
protected void BindToCateNewsGroup(int group) { DataTable datatable = new DataTable(); CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); datatable = _catenewsgroupBSO.GetCateNewsGroupNewAll(Language.language); ddlCateNewsGroup.DataTextField = "CateNewsGroupName"; ddlCateNewsGroup.DataValueField = "GroupCate"; ddlCateNewsGroup.DataSource = datatable; ddlCateNewsGroup.DataBind(); // ddlCateNewsGroup.SelectedValue = datatable.Rows[0]["GroupCate"].ToString(); ddlCateNewsGroup.SelectedValue = Convert.ToString(group); }
protected void btn_edit_Click(object sender, EventArgs e) { try { CateNewsGroup catenewsGroup = ReceiveHtml(); CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); catenewsGroupBSO.UpdateCateNewsGroup(catenewsGroup); clientview.Text = "<div class='alert alert-sm alert-danger bg-gradient'>Cập nhật thành công !</div>"; initControl(catenewsGroup.CateNewsGroupID); AspNetCache.Reset(); } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } }
private string BindMenuCateGroup(string strMenuSub, int iCate, string lang, int group) { CateNewsBSO catenewsBSO = new CateNewsBSO(); DataTable table = catenewsBSO.getCateClientGroupUrl(iCate, lang, group, true); CateNewsGroupBSO cateNewsgroupBSO = new CateNewsGroupBSO(); CateNewsGroup catenewsgroup = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(group, lang); if (catenewsgroup != null) { if (table.Rows.Count > 0) { strMenuSub += "<ul class='dropdown-menu'>"; foreach (DataRow dataRow in table.Rows) { DataTable tblSub = catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(dataRow["CateNewsID"].ToString()), lang, group, true); if (tblSub.Rows.Count > 0) { strMenuSub += "<li class='dropdown-submenu'>"; } else { strMenuSub += "<li>"; } //strMenuSub += "<li class='dropdown-submenu'>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSub += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSub += "<a href='" + ResolveUrl("~/") + "c3/" + catenewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow["CateNewsID"])) + "/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSub += GetSubCategoryMenuCateGroup("", Convert.ToInt32(dataRow["CateNewsID"].ToString()), lang, group); strMenuSub += "</li>"; } strMenuSub += "</ul>"; } } return(strMenuSub); }
protected void btn_add_Click(object sender, EventArgs e) { try { CateNewsGroup catenewsGroup = ReceiveHtml(); CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); int id = catenewsGroupBSO.CreateCateNewsGroup(catenewsGroup); if (!Session["Admin_UserName"].ToString().Equals("administrator")) { AdminRolesBSO adminRolesBSO = new AdminRolesBSO(); DataTable table = adminRolesBSO.GetAdminRolesByUserName(Session["Admin_UserName"].ToString()); CateNewsGroupPermissionBSO catenewGroupPermissionBSO = new CateNewsGroupPermissionBSO(); CateNewsGroupPermission cateNewsGroupPermission = new CateNewsGroupPermission(); if (table.Rows.Count > 0) { foreach (DataRow subrow in table.Rows) { cateNewsGroupPermission.CateNewsGroupID = id; cateNewsGroupPermission.RolesID = Convert.ToInt32(subrow["RolesID"].ToString()); cateNewsGroupPermission.Permission = ""; cateNewsGroupPermission.UserName = Session["Admin_UserName"].ToString(); cateNewsGroupPermission.Created = DateTime.Now; cateNewsGroupPermission.Language = Language.language; catenewGroupPermissionBSO.CreateCateNewsGroupPermission(cateNewsGroupPermission); } } } clientview.Text = "<div class='alert alert-sm alert-danger bg-gradient'>Thêm mới thành công !</div>"; initControl(id); AspNetCache.Reset(); } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } }
protected void btnTags_Click(object sender, EventArgs e) { if (txtTitle.Text != "") { CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); txtSlug.Text = GetString(txtTitle.Text); if (txtTags.Text == "") { txtTags.Text = ddlCateNews.SelectedItem.Text.Replace(",", ""); txtTags.Text += "," + ddlCateNewsGroup.SelectedItem.Text.Replace(",", ""); } if (txtKeywords.Text == "") { txtKeywords.Text = ddlCateNews.SelectedItem.Text.Replace(",", ""); txtKeywords.Text += "," + ddlCateNewsGroup.SelectedItem.Text.Replace(",", ""); } } }
private void ViewCateAll() { CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); DataTable dtGroupCate = catenewsGroupBSO.GetCateNewsGroupAll(Language.language, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); DataTable dtRole = commonBSO.CreateDataView("SELECT * FROM tblRoleCate WHERE GroupId=" + hddRoles.Value);//Lay danh danh chuyen muc nhom quyen dc truy cap CateNewsBSO catenewsBSO = new CateNewsBSO(); for (int i = 0; i < dtGroupCate.Rows.Count; i++) { ListItem item = new ListItem(dtGroupCate.Rows[i]["CateNewsGroupName"].ToString(), dtGroupCate.Rows[i]["CateNewsGroupID"].ToString()); chklist.Items.Add(item); DataTable dtCateAll = commonBSO.CreateDataView("SELECT * FROM tblCateNews WHERE GroupCate=" + dtGroupCate.Rows[i]["GroupCate"]); if (dtCateAll != null && dtCateAll.Rows.Count > 0) { BindCate(0, dtCateAll, dtRole, 1); } //commonBSO.FillToCheckBoxList(chklist, table, "CateNewsGroupName", "CateNewsGroupID"); } }
private void BindControl(int group) { ddlCateNewsSearch.Items.Clear(); CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); DataTable table = catenewsGroupBSO.GetCateNewsGroupNewAll(Language.language, Session["Admin_UserName"].ToString()); commonBSO commonBSO = new commonBSO(); commonBSO.FillToDropDown(ddlCateNewsGroup, table, "~~ Trong tất cả ~~", "-1", "CateNewsGroupName", "GroupCate", ""); ddlType.Items.Clear(); ddlType.Items.Add(new ListItem("--All--", "0")); ddlType.Items.Add(new ListItem("Tiêu đề", "1")); ddlType.Items.Add(new ListItem("Mô tả tin", "2")); ddlType.SelectedValue = "1"; //ddlTypeApproved.Items.Clear(); //ddlTypeApproved.Items.Add(new ListItem("-- Tất cả --", "0")); //ddlTypeApproved.Items.Add(new ListItem("Bài chờ duyệt", "1")); //ddlTypeApproved.Items.Add(new ListItem("Bài đã xuất bản", "2")); //ddlTypeApproved.Items.Add(new ListItem("Bài đã khóa", "3")); //ddlTypeApproved.SelectedValue = "0"; }
protected void Page_Load(object sender, EventArgs e) { int Id = 0; if (!string.IsNullOrEmpty(Request["Id"])) { int.TryParse(Request["Id"].Replace(",", ""), out Id); } if (!string.IsNullOrEmpty(Request["dll"])) { NavigationTitle(Request["dll"]); } hddCateNewsGroupID.Value = Convert.ToString(Id); if (!IsPostBack) { CateNewsGroupBSO _catenewGroupBSO = new CateNewsGroupBSO(); CateNewsGroup _catenewGroups = _catenewGroupBSO.GetCateNewsGroupById(Id); HddGroupCate.Value = Convert.ToString(_catenewGroups.GroupCate); ltlTitle.Text = _catenewGroups.CateNewsGroupName; initControl(Id); } }
private void initControl(int Id) { if (Id > 0) { btn_add.Visible = false; btn_edit.Visible = true; btn_add1.Visible = false; btn_add2.Visible = false; btn_edit1.Visible = true; try { CateNewsGroupBSO catenewsGroupBSO = new CateNewsGroupBSO(); CateNewsGroup catenewsGroup = catenewsGroupBSO.GetCateNewsGroupById(Id); hddCateNewsGroupID.Value = Convert.ToString(catenewsGroup.CateNewsGroupID); txtCateNewsGroupName.Text = catenewsGroup.CateNewsGroupName; txtShortName.Text = catenewsGroup.ShortName; txtGroupCate.Text = catenewsGroup.GroupCate.ToString(); txtDescription.Text = catenewsGroup.Description; hddOrder.Value = Convert.ToString(catenewsGroup.Order); txtMenu.Text = Convert.ToString(catenewsGroup.Menu); chkView.Checked = catenewsGroup.IsView; chkHome.Checked = catenewsGroup.IsHome; chkMenu.Checked = catenewsGroup.IsMenu; chkNews.Checked = catenewsGroup.IsNew; chkPage.Checked = catenewsGroup.IsPage; chkRegister.Checked = catenewsGroup.IsRegister; chkFaq.Checked = catenewsGroup.IsFaq; chkOfficial.Checked = catenewsGroup.IsOfficial; hddIcon.Value = catenewsGroup.Icon; txtimage4_3.Text = catenewsGroup.Icon; if (catenewsGroup.Icon != "") { img_thumb.Text = "<img src='" + catenewsGroup.Icon + "' width='48px'>"; } rdbUrl.Checked = catenewsGroup.IsUrl; txtUrl.Text = catenewsGroup.Url; txtPosition.Text = Convert.ToString(catenewsGroup.Position); if (catenewsGroup.IsUrl == true) { txtUrl.Visible = true; panelFilename.Visible = true; } else { txtUrl.Visible = false; panelFilename.Visible = false; } Bind_ddlPageLayout(); ddlPageLayout.SelectedValue = Convert.ToString(catenewsGroup.PageLayoutID); } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } } else { Bind_ddlPageLayout(); ddlPageLayout.SelectedIndex = 0; btn_edit.Visible = false; btn_add.Visible = true; btn_edit1.Visible = false; btn_add1.Visible = true; btn_add2.Visible = true; rdbUrl.Checked = false; panelFilename.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { int cId = 0; if (!String.IsNullOrEmpty(Request["cid"])) { int.TryParse(Request["cid"], out cId); } int gId = 0; if (!String.IsNullOrEmpty(Request["g"])) { int.TryParse(Request["g"], out gId); } hddGroupCate.Value = Convert.ToString(gId); hddCateID.Value = Convert.ToString(cId); if (!IsPostBack) { CateNewsGroupBSO cateNewsGroupBso = new CateNewsGroupBSO(); CateNewsBSO cateNewsBso = new CateNewsBSO(); CateNews cateNewsById = cateNewsBso.GetCateNewsById(cId); CateNewsGroup groupByGroupCate = cateNewsGroupBso.GetCateNewsGroupByGroupCate(gId, Language.language); if (groupByGroupCate != null && cateNewsById != null) { GetCateParentNewsGroup(cId, gId); Page.Title = cateNewsById.CateNewsName; System.Web.UI.HtmlControls.HtmlMeta _descrip = new HtmlMeta(); _descrip.Name = "description"; _descrip.Content = cateNewsById.CateNewsName + "," + GetString(cateNewsById.CateNewsName); Page.Header.Controls.Add(_descrip); System.Web.UI.HtmlControls.HtmlMeta _keyWords = new HtmlMeta(); _keyWords.Name = "keywords"; _keyWords.Content = GetString(cateNewsById.CateNewsName); Page.Header.Controls.Add(_keyWords); } else if (cId == 0) { if (groupByGroupCate != null) { //GetHotNewsGroup(cId, gId); GetCateParentNewsGroup(cId, gId); Page.Title = groupByGroupCate.CateNewsGroupName; System.Web.UI.HtmlControls.HtmlMeta _descrip = new HtmlMeta(); _descrip.Name = "description"; _descrip.Content = groupByGroupCate.CateNewsGroupName; Page.Header.Controls.Add(_descrip); System.Web.UI.HtmlControls.HtmlMeta _keyWords = new HtmlMeta(); _keyWords.Name = "keywords"; _keyWords.Content = groupByGroupCate.CateNewsGroupName + "," + GetString(groupByGroupCate.CateNewsGroupName); Page.Header.Controls.Add(_keyWords); } } } }
protected void Page_Load(object sender, EventArgs e) { int cId = 0; if (!String.IsNullOrEmpty(Request["cid"])) { int.TryParse(Request["cid"], out cId); } int gId = 0; if (!String.IsNullOrEmpty(Request["g"])) { int.TryParse(Request["g"], out gId); } hddGroupCate.Value = Convert.ToString(gId); hddCateID.Value = Convert.ToString(cId); if (!IsPostBack) { CateNewsGroupBSO cateNewsGroupBso = new CateNewsGroupBSO(); CateNewsBSO cateNewsBso = new CateNewsBSO(); CateNews cateNewsById = cateNewsBso.GetCateNewsById(cId); CateNewsGroup groupByGroupCate = cateNewsGroupBso.GetCateNewsGroupByGroupCate(gId, Language.language); if (groupByGroupCate != null && cateNewsById != null) { //GetHotNewsGroup(cId, gId); ViewListCate(cId, gId); title_name.Text = cateNewsById.CateNewsName; string cate = "<a href='" + ResolveUrl("~/") + "c2/" + cateNewsGroupBso.GetSlugById(groupByGroupCate.CateNewsGroupID) + "/" + GetString(groupByGroupCate.CateNewsGroupName) + "-" + cateNewsById.GroupCate + ".aspx' class='content_Text_Cat' title='" + groupByGroupCate.CateNewsGroupName + "'>"; string s1 = ""; while (cateNewsById.ParentNewsID != 0) { int parentNewsId = cateNewsById.ParentNewsID; cateNewsById = cateNewsBso.GetCateNewsById(parentNewsId); s1 = "<img src='" + ResolveUrl("~/") + "images/icon_arrows1.png' ><a href='" + ResolveUrl("~/") + "c3/" + cateNewsBso.GetSlugByCateId(cateNewsById.CateNewsID) + "/" + GetString(cateNewsById.CateNewsName) + "-" + cateNewsById.GroupCate + "-" + cateNewsById.CateNewsID + ".aspx' class='content_Text_Cat' title='" + cateNewsById.CateNewsName + "'>" + cateNewsById.CateNewsName + "</a>" + s1; } cate += groupByGroupCate.CateNewsGroupName.ToString() + "</a> " + s1; title_cate.Text = "<a href='" + ResolveUrl("~/") + "Default.aspx' class='content_Text_Cat'>" + Resources.resource.T_home + "</a> <img src='" + ResolveUrl("~/") + "images/icon_arrows1.png' >"; title_cate.Text += cate; Page.Title = cateNewsById.CateNewsName; System.Web.UI.HtmlControls.HtmlMeta _descrip = new HtmlMeta(); _descrip.Name = "description"; _descrip.Content = cateNewsById.CateNewsName; Page.Header.Controls.Add(_descrip); System.Web.UI.HtmlControls.HtmlMeta _keyWords = new HtmlMeta(); _keyWords.Name = "keywords"; _keyWords.Content = GetString(cateNewsById.CateNewsName); Page.Header.Controls.Add(_keyWords); } else if (cId == 0) { if (groupByGroupCate != null) { //GetHotNewsGroup(cId, gId); ViewListCate(cId, gId); //title_cate.Text = "<a href='" + ResolveUrl("~/") + "Default.aspx' class='content_Text_Cat'>TRANG CHỦ</a> <img src='" + ResolveUrl("~/") + "images/icon_arrows1.png'> "; title_name.Text = groupByGroupCate.CateNewsGroupName; Page.Title = title_name.Text; System.Web.UI.HtmlControls.HtmlMeta _descrip = new HtmlMeta(); _descrip.Name = "description"; _descrip.Content = title_name.Text; Page.Header.Controls.Add(_descrip); System.Web.UI.HtmlControls.HtmlMeta _keyWords = new HtmlMeta(); _keyWords.Name = "keywords"; _keyWords.Content = GetString(title_name.Text); Page.Header.Controls.Add(_keyWords); } } } }
private void GetMenuBarOE() { if (AspNetCache.CheckCache("HTML_ltlMenuBarOE_11") == false) { CateNewsGroupBSO _catenewsgroupBSO = new CateNewsGroupBSO(); CateNewsBSO _catenewsBSO = new CateNewsBSO(); NewsGroupBSO _newsgroupBSO = new NewsGroupBSO(); DataTable table_news = new DataTable(); DataTable table_cate = new DataTable(); DataTable table_cate_sub = new DataTable(); DataTable table_cate_group = new DataTable(); DataTable tableClone1 = table_cate_group.Clone(); DataTable tableClone2 = table_cate_group.Clone(); string strMenu = ""; // string strMenuSub = ""; string strMenuSubCate = ""; string strMenuItem = ""; strMenu += "<ul class='nav navbar-nav'>"; strMenu += "<li class='dropdown mega-menu-fullwidth'>"; strMenu += "<a href='" + ResolveUrl("~/") + "Default.aspx' class='dropdown-toggle' data-toggle='dropdown'>"; strMenu += "<span class='fa fa-home' style='font-size:20px;'></span>"; strMenu += "</a>"; // <!-- 0 -->; strMenu += "<ul class='dropdown-menu'>"; strMenu += "<li>"; strMenu += "<div class='mega-menu-content disable-icons'>"; strMenu += "<div class='container'>"; strMenu += "<div class='row equal-height'>"; table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 2, 4, true); //Start Left (1) if (table_cate.Rows.Count > 0) { strMenuSubCate = "<div class='col-md-3 col-lg-3 col-sm-6 col-xs-12 equal-height-in'>"; strMenuSubCate += "<ul class='list-unstyled equal-height-list'>"; table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[0]["CateNewsID"].ToString()), Language.language, 2, 7, true); if (table_cate_sub.Rows.Count > 0) { for (int i = 0; i < table_cate_sub.Rows.Count; i++) { DataRow dataRow = table_cate_sub.Rows[i]; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dmp/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSubCate += "</li>"; } } strMenuSubCate += "</ul>"; strMenuSubCate += "</div>"; strMenu += strMenuSubCate; } //EndLeft (1) //Start Mid1 (2) if (table_cate.Rows.Count > 1) { strMenuSubCate = "<div class='col-md-3 col-lg-3 col-sm-6 col-xs-12 equal-height-in'>"; strMenuSubCate += "<ul class='list-unstyled equal-height-list'>"; strMenuSubCate += "<li><h3>" + table_cate.Rows[1]["CateNewsName"].ToString() + "</h3></li>"; table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[1]["CateNewsID"].ToString()), Language.language, 2, 7, true); if (table_cate_sub.Rows.Count > 0) { for (int i = 0; i < table_cate_sub.Rows.Count; i++) { DataRow dataRow = table_cate_sub.Rows[i]; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dmp/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSubCate += "</li>"; } } strMenuSubCate += "</ul>"; strMenuSubCate += "</div>"; strMenu += strMenuSubCate; } //End Mid1 (2) //Start Mid2 (3) if (table_cate.Rows.Count > 2) { strMenuSubCate = "<div class='col-md-3 col-lg-3 col-sm-6 col-xs-12 equal-height-in'>"; strMenuSubCate += "<ul class='list-unstyled equal-height-list'>"; strMenuSubCate += "<li><h3>" + table_cate.Rows[2]["CateNewsName"].ToString() + "</h3></li>"; table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[2]["CateNewsID"].ToString()), Language.language, 2, 7, true); if (table_cate_sub.Rows.Count > 0) { for (int i = 0; i < table_cate_sub.Rows.Count; i++) { DataRow dataRow = table_cate_sub.Rows[i]; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dmp/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSubCate += "</li>"; } } strMenuSubCate += "</ul>"; strMenuSubCate += "</div>"; strMenu += strMenuSubCate; } //End Mid2 (3) //Start Right (4) if (table_cate.Rows.Count > 3) { strMenuSubCate = "<div class='col-md-3 col-lg-3 col-sm-6 col-xs-12 equal-height-in'>"; strMenuSubCate += "<ul class='list-unstyled equal-height-list'>"; strMenuSubCate += "<li><h3>" + table_cate.Rows[3]["CateNewsName"].ToString() + "</h3></li>"; table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[3]["CateNewsID"].ToString()), Language.language, 2, 7, true); if (table_cate_sub.Rows.Count > 0) { for (int i = 0; i < table_cate_sub.Rows.Count; i++) { DataRow dataRow = table_cate_sub.Rows[i]; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dmp/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSubCate += "</li>"; } } strMenuSubCate += "</ul>"; strMenuSubCate += "</div>"; strMenu += strMenuSubCate; } //End Right (4) strMenu += "</div>"; strMenu += "</div>"; strMenu += "</div>"; strMenu += "</li>"; strMenu += "</ul>"; strMenu += "</li>"; //Menu 2 - Tuyen sinh DH-CD //strMenu += "<li><a href='#'>Tuyển sinh ĐH-CĐ</a>"; strMenu += "<li class='dropdown mega-menu-fullwidth'>"; strMenu += "<a href='" + ResolveUrl("~/") + "ts-f/" + GetString("Tuyển sinh ĐH-CĐ") + "-5.aspx' class='dropdown-toggle' data-toggle='dropdown'>"; strMenu += "Tuyển sinh ĐH-CĐ"; strMenu += "</a>"; strMenu += "<ul class='dropdown-menu'>"; strMenu += "<li>"; strMenu += "<div class='mega-menu-content disable-icons'>"; strMenu += "<div class='container'>"; strMenu += "<div class='row equal-height'>"; table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 5, 3, true); //Start Left (1) if (table_cate.Rows.Count > 0) { strMenuSubCate = "<div class='col-md-4 col-lg-4 col-sm-4 col-xs-12 equal-height-in'>"; strMenuSubCate += "<ul class='list-unstyled equal-height-list'>"; strMenuSubCate += "<li><h3>" + table_cate.Rows[0]["CateNewsName"].ToString() + "</h3></li>"; table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[0]["CateNewsID"].ToString()), Language.language, 5, 12, true); if (table_cate_sub.Rows.Count > 0) { for (int i = 0; i < table_cate_sub.Rows.Count; i++) { DataRow dataRow = table_cate_sub.Rows[i]; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSubCate += "</li>"; } } strMenuSubCate += "</ul>"; strMenuSubCate += "</div>"; strMenu += strMenuSubCate; } //EndLeft (1) //Start Mid 1 (2) if (table_cate.Rows.Count > 1) { strMenuSubCate = "<div class='col-md-4 col-lg-4 col-sm-4 col-xs-12 equal-height-in'>"; strMenuSubCate += "<ul class='list-unstyled equal-height-list'>"; strMenuSubCate += "<li><h3>" + table_cate.Rows[1]["CateNewsName"].ToString() + "</h3></li>"; table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[1]["CateNewsID"].ToString()), Language.language, 5, 12, true); if (table_cate_sub.Rows.Count > 0) { for (int i = 0; i < table_cate_sub.Rows.Count; i++) { DataRow dataRow = table_cate_sub.Rows[i]; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSubCate += "</li>"; } } strMenuSubCate += "</ul>"; strMenuSubCate += "</div>"; strMenu += strMenuSubCate; } //End Mid 1 (2) //Start Mid 2 (3) if (table_cate.Rows.Count > 2) { strMenuSubCate = "<div class='col-md-4 col-lg-4 col-sm-4 col-xs-12 equal-height-in'>"; strMenuSubCate += "<ul class='list-unstyled equal-height-list'>"; strMenuSubCate += "<li><h3>" + table_cate.Rows[2]["CateNewsName"].ToString() + "</h3></li>"; table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[2]["CateNewsID"].ToString()), Language.language, 5, 8, true); if (table_cate_sub.Rows.Count > 0) { for (int i = 0; i < table_cate_sub.Rows.Count; i++) { DataRow dataRow = table_cate_sub.Rows[i]; strMenuSubCate += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } else { strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'><i class='fa fa-list'></i>" + dataRow["CateNewsName"].ToString() + "</a>"; } strMenuSubCate += "</li>"; } } //strMenuSubCate += "<a class='bt_menubar_1' href='#'><span>Đăng ký tuyển sinh trực tuyến</span></a>"; strMenuSubCate += "</ul>"; strMenuSubCate += "</div>"; strMenu += strMenuSubCate; } //End Mid 2 (3) strMenu += "</div>"; strMenu += "</div>"; strMenu += "</div>"; strMenu += "</li>"; strMenu += "</ul>"; strMenu += "</li>"; //End Menu 2 ////Menu 3 - Tuyen sinh THPT //int groupcate1 = 6; //strMenu += " <li><a href='" + ResolveUrl("~/") + "ts-f/" + GetString("Tuyển sinh THPT") + "-" + groupcate1 + ".aspx'>Tuyển sinh THPT</a>"; //strMenu += " <div style='left: -196px;'>"; //table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 6, 2, true); ////Start Left (1) //if (table_cate.Rows.Count > 0) //{ // strMenuSubCate = "<ul class='oe_subleftmenu'>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[0]["CateNewsID"].ToString()), Language.language, 6, 7, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndLeft (1) ////Content ////Start Content //table_news = _newsgroupBSO.GetNewsGroupHot(Language.language, 4, "1", 6); //strMenuItem = "<ul class='oe_menucontent-mid'>"; //strMenuItem += "<span class='heading_icon'> Thông báo tuyển sinh THPT</span>"; //if (table_news.Rows.Count > 0) //{ // strMenuItem += "<li class='menu_content-mid'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // for (int i = 0; i < table_news.Rows.Count; i++) // { // DataRow dataRow = table_news.Rows[i]; // strMenuItem += "<li>"; // strMenuItem += "<a href='" + ResolveUrl("~/") + "ts/" + GetString(dataRow["Title"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["NewsGroupID"].ToString() + ".aspx'>"; // if (dataRow["ImageThumb"].ToString() != "") // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "Upload/NewsGroup/NewsGroupThumb/" + dataRow["ImageThumb"].ToString(),80) + "' vspace='1' class='img_news_menu'>"; // else // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "images/img_logo.jpg", 80) + "' vspace='1' class='img_news_menu'>"; // strMenuItem += dataRow["Title"].ToString(); // DateTime dtNow; // dtNow = DateTime.Now; // if (Convert.ToDateTime(dataRow["PostDate"].ToString()).Date >= dtNow.Date) // strMenuItem += "<img src='" + ResolveUrl("~/") + "images/red-star.gif' class='icon12' />"; // strMenuItem += "<br style='clear: both;' />"; // strMenuItem += "</a></li>"; // if ((i + 1) % 2 == 0) // { // strMenuItem += "</ul>"; // strMenuItem += "</li>"; // strMenuItem += "<li class='menu_content'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // } // } // strMenuItem += "</ul>"; // strMenuItem += "</li>"; //} //strMenuItem += "</ul>"; //strMenu += strMenuItem; ////end content ////Start Right //if (table_cate.Rows.Count > 1) //{ // strMenuSubCate = "<ul class='oe_subrightmenu_1'>"; // strMenuSubCate += "<li class='heading_bold'>" + table_cate.Rows[1]["CateNewsName"].ToString() + "</li>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[1]["CateNewsID"].ToString()), Language.language, 6, 7, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndRight //strMenu += "</div>"; //strMenu += "</li>"; ////End Menu3 ////Menu 4 - Tu van ho tro ////strMenu += "<li><a href=''>Tư vấn hỗ trợ</a>"; //strMenu += "<li><a href='" + ResolveUrl("~/") + "ts-f/" + GetString("Tư vấn Hỗ trợ") + "-7.aspx'> Tư vấn Hỗ trợ</a>"; //strMenu += "<div style='left: -329px;'>"; //table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 7, 4, true); ////Start Left (1) //if (table_cate.Rows.Count > 0) //{ // strMenuSubCate = "<ul class='oe_subleftmenu'>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[0]["CateNewsID"].ToString()), Language.language, 7, 7, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndLeft (1) ////Start Mid 1 (2) //if (table_cate.Rows.Count > 1) //{ // strMenuSubCate = "<ul class='oe_menucontent_mid_1'>"; // strMenuSubCate += "<span class='heading_icon'>" + table_cate.Rows[1]["CateNewsName"].ToString() + "</span>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[1]["CateNewsID"].ToString()), Language.language, 7, 4, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "<a class='bt_menubar_1' href='#'><span>Tra điểm ĐH-CĐ</span></a>"; // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////End Mid 1 (2) ////Start Mid 2 (3) //if (table_cate.Rows.Count > 2) //{ // strMenuSubCate = "<ul class='oe_menucontent_mid_2'>"; // strMenuSubCate += "<span class='heading_icon'>" + table_cate.Rows[2]["CateNewsName"].ToString() + "</span>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[2]["CateNewsID"].ToString()), Language.language, 7, 12, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////End Mid 2 (3) ////Start Mid 3 (4) //if (table_cate.Rows.Count > 3) //{ // strMenuSubCate = "<ul class='oe_subrightmenu_1'>"; // strMenuSubCate += "<li class='heading_bold'>" + table_cate.Rows[3]["CateNewsName"].ToString() + "</li>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[3]["CateNewsID"].ToString()), Language.language, 7, 5, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "<a class='bt_menubar_1' href='#'><span>Đăng ký trực tuyến</span></a>"; // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////End Mid 3 (4) //strMenu += "</div>"; //strMenu += "</li>"; ////End menu 5 ////Menu 5 - On thi Dai hoc //strMenu += "<li><a href='" + ResolveUrl("~/") + "ts-f/" + GetString("Ôn thi Đại học") + "-8.aspx'>Ôn thi Đại học</a>"; //strMenu += "<div style='left: -451px;'>"; //table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 8, 3, true); ////Start Left (1) //if (table_cate.Rows.Count > 0) //{ // strMenuSubCate = "<ul class='oe_subleftmenu_1'>"; // strMenuSubCate += "<span class='heading_icon'>" + table_cate.Rows[0]["CateNewsName"].ToString() + "</span>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[0]["CateNewsID"].ToString()), Language.language, 8, 12, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndLeft (1) ////Start Mid 1 (2) //if (table_cate.Rows.Count > 1) //{ // strMenuSubCate = "<ul class='oe_menucontent_mid_22'>"; // strMenuSubCate += "<span class='heading_icon'>" + table_cate.Rows[1]["CateNewsName"].ToString() + "</span>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[1]["CateNewsID"].ToString()), Language.language, 8, 12, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////End Mid 1 (2) ////Start Mid 2 (3) //if (table_cate.Rows.Count > 2) //{ // strMenuSubCate = "<ul class='oe_menucontent_mid_2_noline'>"; // strMenuSubCate += "<span class='heading_icon'>" + table_cate.Rows[2]["CateNewsName"].ToString() + "</span>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[2]["CateNewsID"].ToString()), Language.language, 8, 8, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "<a class='bt_menubar_1' href='#'><span>Đăng ký học trực tuyến</span></a>"; // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////End Mid 2 (3) //strMenu += "</div>"; //strMenu += "</li>"; ////End Menu 5 ////Menu 6 - Du học //strMenu += "<li><a href='" + ResolveUrl("~/") + "ts-f/" + GetString("Du học") + "-9.aspx'>Du học</a>"; //strMenu += "<div style='left: -574px;'>"; ////Start Left //strMenuSubCate = "<ul class='oe_subleftmenu'>"; //table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 9, 7); //if (table_cate.Rows.Count > 0) //{ // for (int i = 0; i < table_cate.Rows.Count; i++) // { // DataRow dataRow = table_cate.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } //} //strMenuSubCate += "</ul>"; //strMenu += strMenuSubCate; ////EndLeft ////Start Content //table_news = _newsgroupBSO.GetNewsGroupHot(Language.language, 6, "1", 9); //strMenuItem = "<ul class='oe_menucontent'>"; //if (table_news.Rows.Count > 0) //{ // strMenuItem += "<li class='menu_content'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // for (int i = 0; i < table_news.Rows.Count; i++) // { // DataRow dataRow = table_news.Rows[i]; // strMenuItem += "<li>"; // strMenuItem += "<a href='" + ResolveUrl("~/") + "ts/" + GetString(dataRow["Title"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["NewsGroupID"].ToString() + ".aspx'>"; // if (dataRow["ImageThumb"].ToString() != "") // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "Upload/NewsGroup/NewsGroupThumb/" + dataRow["ImageThumb"].ToString(),80) + "' vspace='1' class='img_news_menu'>"; // else // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "images/img_logo.jpg", 80) + "' vspace='1' class='img_news_menu'>"; // strMenuItem += dataRow["Title"].ToString(); // DateTime dtNow; // dtNow = DateTime.Now; // if (Convert.ToDateTime(dataRow["PostDate"].ToString()).Date >= dtNow.Date) // strMenuItem += "<img src='" + ResolveUrl("~/") + "images/red-star.gif' class='icon12' />"; // strMenuItem += "<br style='clear: both;' />"; // strMenuItem += "</a></li>"; // if ((i + 1) % 2 == 0) // { // strMenuItem += "</ul>"; // strMenuItem += "</li>"; // strMenuItem += "<li class='menu_content'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // } // } // strMenuItem += "</ul>"; // strMenuItem += "</li>"; //} //strMenuItem += "</ul>"; //strMenu += strMenuItem; //strMenu += "</div>"; //strMenu += "</li>"; ////End Menu 6 ////Menu 8 - Ban Tin giao duc //strMenu += " <li><a href='" + ResolveUrl("~/") + "ts-f/" + GetString("Bản tin giáo dục") + "-1.aspx'>Bản tin giáo dục</a>"; //strMenu += " <div style='left: -650px;'>"; //table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 1, 2, true); ////Start Left (1) //if (table_cate.Rows.Count > 0) //{ // strMenuSubCate = "<ul class='oe_subleftmenu'>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[0]["CateNewsID"].ToString()), Language.language, 1, 7, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndLeft (1) ////Content ////Start Content //table_news = _newsgroupBSO.GetNewsGroupHot(Language.language, 4, "1", 1); //strMenuItem = "<ul class='oe_menucontent-mid'>"; //strMenuItem += "<span class='heading_icon'>Tin nổi bật</span>"; //if (table_news.Rows.Count > 0) //{ // strMenuItem += "<li class='menu_content-mid'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // for (int i = 0; i < table_news.Rows.Count; i++) // { // DataRow dataRow = table_news.Rows[i]; // strMenuItem += "<li>"; // strMenuItem += "<a href='" + ResolveUrl("~/") + "ts/" + GetString(dataRow["Title"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["NewsGroupID"].ToString() + ".aspx'>"; // if (dataRow["ImageThumb"].ToString() != "") // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "Upload/NewsGroup/NewsGroupThumb/" + dataRow["ImageThumb"].ToString(),80) + "' vspace='1' class='img_news_menu'>"; // else // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "images/img_logo.jpg", 80) + "' vspace='1' class='img_news_menu'>"; // strMenuItem += dataRow["Title"].ToString(); // DateTime dtNow; // dtNow = DateTime.Now; // if (Convert.ToDateTime(dataRow["PostDate"].ToString()).Date >= dtNow.Date) // strMenuItem += "<img src='" + ResolveUrl("~/") + "images/red-star.gif' class='icon12' />"; // strMenuItem += "<br style='clear: both;' />"; // strMenuItem += "</a></li>"; // if ((i + 1) % 2 == 0) // { // strMenuItem += "</ul>"; // strMenuItem += "</li>"; // strMenuItem += "<li class='menu_content'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // } // } // strMenuItem += "</ul>"; // strMenuItem += "</li>"; //} //strMenuItem += "</ul>"; //strMenu += strMenuItem; ////end content ////Start Right //if (table_cate.Rows.Count > 1) //{ // strMenuSubCate = "<ul class='oe_subrightmenu_1'>"; // strMenuSubCate += "<li class='heading_bold'>" + table_cate.Rows[1]["CateNewsName"].ToString() + "</li>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[1]["CateNewsID"].ToString()), Language.language, 1, 7, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndRight //strMenu += "</div>"; //strMenu += "</li>"; ////End Menu 8 ////Menu 9 - Huong nghiep, viec lam //strMenu += "<li><a href='" + ResolveUrl("~/") + "ts-f/" + GetString("Hướng nghiệp, Việc làm") + "-10.aspx'>Hướng nghiệp, Việc làm</a>"; //strMenu += "<div style='left: -789px;'>"; //table_cate = _catenewsBSO.getCateClientGroupUrl(0, Language.language, 10, 2, true); ////Start Left (1) //if (table_cate.Rows.Count > 0) //{ // strMenuSubCate = "<ul class='oe_subleftmenu'>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[0]["CateNewsID"].ToString()), Language.language, 10, 7, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndLeft (1) ////Content ////Start Content //table_news = _newsgroupBSO.GetNewsGroupHot(Language.language, 4, "1", 7); //strMenuItem = "<ul class='oe_menucontent-mid'>"; //strMenuItem += "<span class='heading_icon'>Tin nổi bật</span>"; //if (table_news.Rows.Count > 0) //{ // strMenuItem += "<li class='menu_content-mid'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // for (int i = 0; i < table_news.Rows.Count; i++) // { // DataRow dataRow = table_news.Rows[i]; // strMenuItem += "<li>"; // strMenuItem += "<a href='" + ResolveUrl("~/") + "ts/" + GetString(dataRow["Title"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["NewsGroupID"].ToString() + ".aspx'>"; // if (dataRow["ImageThumb"].ToString() != "") // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "Upload/NewsGroup/NewsGroupThumb/" + dataRow["ImageThumb"].ToString(),80) + "' vspace='1' class='img_news_menu'>"; // else // strMenuItem += "<img src='" + Utils.getURLThumbImage(ResolveUrl("~/") + "images/img_logo.jpg", 80) + "' vspace='1' class='img_news_menu'>"; // strMenuItem += dataRow["Title"].ToString(); // DateTime dtNow; // dtNow = DateTime.Now; // if (Convert.ToDateTime(dataRow["PostDate"].ToString()).Date >= dtNow.Date) // strMenuItem += "<img src='" + ResolveUrl("~/") + "images/red-star.gif' class='icon12' />"; // strMenuItem += "<br style='clear: both;' />"; // strMenuItem += "</a></li>"; // if ((i + 1) % 2 == 0) // { // strMenuItem += "</ul>"; // strMenuItem += "</li>"; // strMenuItem += "<li class='menu_content'>"; // strMenuItem += "<ul class='oe_subleftmenu2'>"; // } // } // strMenuItem += "</ul>"; // strMenuItem += "</li>"; //} //strMenuItem += "</ul>"; //strMenu += strMenuItem; ////end content ////Start Right //if (table_cate.Rows.Count > 1) //{ // strMenuSubCate = "<ul class='oe_subrightmenu_1'>"; // strMenuSubCate += "<li class='heading_bold'>" + table_cate.Rows[1]["CateNewsName"].ToString() + "</li>"; // table_cate_sub = _catenewsBSO.getCateClientGroupUrl(Convert.ToInt32(table_cate.Rows[1]["CateNewsID"].ToString()), Language.language, 10, 7, true); // if (table_cate_sub.Rows.Count > 0) // { // for (int i = 0; i < table_cate_sub.Rows.Count; i++) // { // DataRow dataRow = table_cate_sub.Rows[i]; // strMenuSubCate += "<li>"; // if (Convert.ToBoolean(dataRow["isUrl"].ToString())) // strMenuSubCate += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["CateNewsName"].ToString() + "</a>"; // else // strMenuSubCate += "<a href='" + ResolveUrl("~/") + "ts-dm/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["CateNewsName"].ToString() + "</a>"; // strMenuSubCate += "</li>"; // } // } // strMenuSubCate += "</ul>"; // strMenu += strMenuSubCate; //} ////EndRight //strMenu += "</div>"; //strMenu += "</li>"; ////End Menu 9 strMenu += "</ul>"; AspNetCache.SetCacheWithTime("HTML_ltlMenuBarOE_11", strMenu, 150); ltlMenuBarOE.Text = strMenu; } else { ltlMenuBarOE.Text = (string)AspNetCache.GetCache("HTML_ltlMenuBarOE_11"); } }
public static void GetNavigation(string strSlugPage, string g, string cId, string Id, string urlRoot) { if (strSlugPage != string.Empty) { SYS_PageLayoutBSO _pageLayoutBSO = new SYS_PageLayoutBSO(); SYS_PageLayout _pageLayout = new SYS_PageLayout(); if (!AspNetCache.CheckCache("PageLayout_" + strSlugPage + "_" + Language.language.Replace("-", "_"))) { _pageLayout = _pageLayoutBSO.GetSYS_PageLayoutBySlug(strSlugPage, Language.language); if (_pageLayout == null) { _pageLayout = _pageLayoutBSO.GetSYS_PageLayoutBySlug("home", Language.language); } AspNetCache.SetCache("PageLayout_" + strSlugPage + "_" + Language.language.Replace("-", "_"), _pageLayout); } else { _pageLayout = (SYS_PageLayout)AspNetCache.GetCache("PageLayout_" + strSlugPage + "_" + Language.language.Replace("-", "_")); } Navigation.TitleName = _pageLayout.PageName; Navigation.TitleCate = "<li><a href='" + urlRoot + "'>Trang chủ</a></li>"; CateNewsGroupBSO cateNewsgroupBSO = new CateNewsGroupBSO(); NewsGroupBSO newsgroupBSO = new NewsGroupBSO(); CateNewsBSO catenewsBSO = new CateNewsBSO(); if (strSlugPage == "du-an") { if (!String.IsNullOrEmpty(Id)) { Navigation.TitleName = "Thông tin dự án"; string cate = "<li><a href='" + urlRoot + "c2/du-an-c/du-an-1.aspx'>Dự án"; cate += "</a></li>"; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; Navigation.TitleCate += cate; } } else if (strSlugPage == "detailvideos") { if (!String.IsNullOrEmpty(cId)) { VideosCateBSO videosCateBSO = new VideosCateBSO(); VideosCate videoCate = videosCateBSO.GetVideosCateById(Convert.ToInt32(cId)); Navigation.TitleName = "<a href='" + urlRoot + "thu-vien-video" + "-" + videoCate.VideosCateID + ".aspx'>" + videoCate.VideosCateName + "</a>"; string cate = "<li><a href='" + urlRoot + "thu-vien-video.aspx'>Thư viện Video"; string s1 = ""; while (videoCate.ParentCateID != 0) { int pId = videoCate.ParentCateID; videoCate = videosCateBSO.GetVideosCateById(pId); s1 = "<li><a href='" + urlRoot + "thu-vien-video/" + videoCate.VideosCateName + "-" + videoCate.VideosCateID + ".aspx'>" + videoCate.VideosCateName + "</a></li>" + s1; } // cate += "Video"; //Sửa lại cate += "</a></li>"; cate += s1; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; Navigation.TitleCate += cate; } } else if (strSlugPage == "detailalbums") { if (!String.IsNullOrEmpty(cId)) { AlbumsCateBSO albumsCateBSO = new AlbumsCateBSO(); AlbumsCate videoCate = albumsCateBSO.GetAlbumsCateById(Convert.ToInt32(cId)); Navigation.TitleName = "<a href='" + urlRoot + "thu-vien-video" + "-" + videoCate.AlbumsCateID + ".aspx'>" + videoCate.AlbumsCateName + "</a>"; string cate = "<li><a href='" + urlRoot + "thu-vien-video.aspx'>Thư viện Video"; string s1 = ""; while (videoCate.ParentCateID != 0) { int pId = videoCate.ParentCateID; videoCate = albumsCateBSO.GetAlbumsCateById(pId); s1 = "<li><a href='" + urlRoot + "thu-vien-video/" + videoCate.AlbumsCateName + "-" + videoCate.AlbumsCateID + ".aspx'>" + videoCate.AlbumsCateName + "</a></li>" + s1; } // cate += "Video"; //Sửa lại cate += "</a></li>"; cate += s1; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; Navigation.TitleCate += cate; } } else if (strSlugPage == "dh") { if (!String.IsNullOrEmpty(g)) { Navigation.TitleName = "<a href='" + urlRoot + "tim-truong/0-0-0-0-0-0-0/search.aspx'>Thông tin trường</a>"; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; } } else if (strSlugPage == "dang-ky-ts") { if (!String.IsNullOrEmpty(g)) { Navigation.TitleName = "<a href='" + urlRoot + "c2/dh-dk/Dang-ky-tuyen-sinh-truc-tuyen-20.aspx'>Trang Đăng ký tuyển sinh</a>"; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; } } else if (strSlugPage == "dh-dk") { if (!String.IsNullOrEmpty(g)) { Navigation.TitleName = "<a href='" + urlRoot + "c2/dh-dk/Dang-ky-tuyen-sinh-truc-tuyen-20.aspx'>Trang Đăng ký tuyển sinh</a>"; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; } } else if (!String.IsNullOrEmpty(Id)) { NewsGroup newsgroup = newsgroupBSO.GetNewsGroupById(Convert.ToInt32(Id)); if (newsgroup != null && newsgroup.CateNewsID > 0) { CateNews catenews = catenewsBSO.GetCateNewsById(newsgroup.CateNewsID); CateNewsGroup cateNewsGroup = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(catenews.GroupCate, Language.language); Navigation.TitleName = "<a href='" + urlRoot + "c3/" + catenewsBSO.GetSlugByCateId(catenews.CateNewsID) + "/" + GetString(catenews.CateNewsName) + "-" + catenews.GroupCate + "-" + catenews.CateNewsID + ".aspx'>" + catenews.CateNewsName + "</a>"; string cate = "<li><a href='" + urlRoot + "c2/" + cateNewsgroupBSO.GetSlugById(cateNewsGroup.CateNewsGroupID) + "/" + GetString(cateNewsGroup.CateNewsGroupName) + "-" + catenews.GroupCate + ".aspx'>"; string s1 = ""; while (catenews.ParentNewsID != 0) { int pId = catenews.ParentNewsID; catenews = catenewsBSO.GetCateNewsById(pId); s1 = "<li><a href='" + urlRoot + "c3/" + catenewsBSO.GetSlugByCateId(catenews.CateNewsID) + "/" + GetString(catenews.CateNewsName) + "-" + catenews.GroupCate + "-" + catenews.CateNewsID + ".aspx'>" + catenews.CateNewsName + "</a></li>" + s1; } cate += cateNewsGroup.CateNewsGroupName.ToString(); //Sửa lại cate += "</a></li>"; cate += s1; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; Navigation.TitleCate += cate; } } else { if (!String.IsNullOrEmpty(cId) && !String.IsNullOrEmpty(g)) { CateNews cateNewsById = catenewsBSO.GetCateNewsById(Convert.ToInt32(cId)); CateNewsGroup groupByGroupCate = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(Convert.ToInt32(g), Language.language); if (groupByGroupCate != null && cateNewsById != null) { Navigation.TitleName = cateNewsById.CateNewsName; string cate = "<li><a href='" + urlRoot + "c2/" + cateNewsgroupBSO.GetSlugById(groupByGroupCate.CateNewsGroupID) + "/" + GetString(groupByGroupCate.CateNewsGroupName) + "-" + cateNewsById.GroupCate + ".aspx' title='" + groupByGroupCate.CateNewsGroupName + "'>"; string s1 = ""; while (cateNewsById.ParentNewsID != 0) { int parentNewsId = cateNewsById.ParentNewsID; cateNewsById = catenewsBSO.GetCateNewsById(parentNewsId); s1 = "<li><a href='" + urlRoot + "c3/" + catenewsBSO.GetSlugByCateId(cateNewsById.CateNewsID) + "/" + GetString(cateNewsById.CateNewsName) + "-" + cateNewsById.GroupCate + "-" + cateNewsById.CateNewsID + ".aspx' title='" + cateNewsById.CateNewsName + "'>" + cateNewsById.CateNewsName + "</a></li>" + s1; } cate += groupByGroupCate.CateNewsGroupName.ToString() + "</a></li>" + s1; Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; Navigation.TitleCate += cate; } } else { if (!String.IsNullOrEmpty(g)) { CateNewsGroup groupByGroupCate = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(Convert.ToInt32(g), Language.language); Navigation.TitleCate = "<li><a href='" + urlRoot + "Default.aspx'>" + Resources.resource.T_home + "</a></li>"; if (groupByGroupCate != null) { Navigation.TitleName = groupByGroupCate.CateNewsGroupName; } } } } } }
private string BindMenuVer(string strMenuSub, int groupcate, int cID) { DataTable table = new DataTable(); CateNewsBSO catenewsBSO = new CateNewsBSO(); table = catenewsBSO.getCateClientGroupUrl(cID, Language.language, groupcate, true); CateNewsGroupBSO cateNewsgroupBSO = new CateNewsGroupBSO(); CateNewsGroup catenewsgroup = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(groupcate, Language.language); if (catenewsgroup != null) { if (table.Rows.Count > 0) { // int level = 1; strMenuSub += "<ul class='nav nav-stacke'>"; foreach (DataRow dataRow in table.Rows) { // strMenuSub += "<li>"; //strMenuSub += "<a href='" + ResolveUrl("~/") + "Admin/" + dataRow["Modules_Url"] + "/Default.aspx'>" + dataRow["Modules_Name"].ToString() + "</a>"; if (checkActive(cID, Convert.ToInt32(dataRow["CateNewsID"].ToString()))) { strMenuSub += "<li class='active'>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSub += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["ShortName"].ToString() + "</a>"; } else { strMenuSub += "<a href='" + ResolveUrl("~/") + "c3/" + catenewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow["CateNewsID"])) + "/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["ShortName"].ToString() + "</a>"; } strMenuSub += "</li>"; } else { strMenuSub += "<li>"; if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSub += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["ShortName"].ToString() + "</a>"; } else { strMenuSub += "<a href='" + ResolveUrl("~/") + "c3/" + catenewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow["CateNewsID"])) + "/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["ShortName"].ToString() + "</a>"; } //strMenuSub += "<a href='" + ResolveUrl("~/") + "Admin/" + dataRow["Modules_Url"] + "/Default.aspx'>" + dataRow["Modules_Name"].ToString() + "</a>"; strMenuSub += "</li>"; } // strMenuSub += GetSubMenu("", Convert.ToInt32(dataRow["CateNewsID"].ToString()), groupcate, cID, level + 1); //strMenuSub += "</div>"; //strMenuSub += "</li>"; } strMenuSub += "</ul>"; } } return(strMenuSub); }
private string BindMenu(string strMenuSub, int groupcate, int cID) { //if (AdminName.Equals("administrator")) //{ // SQL = "SELECT * FROM tblModules Where [IsMenu] =1 And [Modules_Parent] = " + iCate + " Order by [Modules_Order] ASC"; // table = common.CreateDataView(SQL); //} //else //{ // SQL = "SELECT * FROM tblModules Where [IsMenu] =1 And [Modules_Parent] = " + iCate + " And Modules_Url in ('" + strModules + "') Order by [Modules_Order] ASC"; // table = common.CreateDataView(SQL); //} DataTable table = new DataTable(); CateNewsBSO catenewsBSO = new CateNewsBSO(); table = catenewsBSO.getCateClientGroupUrl(0, Language.language, groupcate, true); CateNewsGroupBSO cateNewsgroupBSO = new CateNewsGroupBSO(); CateNewsGroup catenewsgroup = cateNewsgroupBSO.GetCateNewsGroupByGroupCate(groupcate, Language.language); if (catenewsgroup != null) { if (table.Rows.Count > 0) { strMenuSub += "<ul>"; foreach (DataRow dataRow in table.Rows) { strMenuSub += "<li>"; //strMenuSub += "<a href='" + ResolveUrl("~/") + "Admin/" + dataRow["Modules_Url"] + "/Default.aspx'>" + dataRow["Modules_Name"].ToString() + "</a>"; if (checkActive(cID, Convert.ToInt32(dataRow["CateNewsID"].ToString()))) { if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSub += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["ShortName"].ToString() + "</a>"; } else { strMenuSub += "<a href='" + ResolveUrl("~/") + "c3/" + catenewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow["CateNewsID"])) + "/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["ShortName"].ToString() + "</a>"; } //strMenuSub += "<a href='" + ResolveUrl("~/") + "Admin/" + dataRow["Modules_Url"] + "/Default.aspx'>" + dataRow["Modules_Name"].ToString() + "</a>"; strMenuSub += "<span class='closed opened'></span>"; strMenuSub += "<div style='display: block;'>"; } else { if (Convert.ToBoolean(dataRow["isUrl"].ToString())) { strMenuSub += "<a href='" + dataRow["Url"].ToString() + "'>" + dataRow["ShortName"].ToString() + "</a>"; } else { strMenuSub += "<a href='" + ResolveUrl("~/") + "c3/" + catenewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow["CateNewsID"])) + "/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx'>" + dataRow["ShortName"].ToString() + "</a>"; } //strMenuSub += "<a href='" + ResolveUrl("~/") + "Admin/" + dataRow["Modules_Url"] + "/Default.aspx'>" + dataRow["Modules_Name"].ToString() + "</a>"; strMenuSub += "<span class='closed'></span>"; strMenuSub += "<div style='display: none;'>"; } strMenuSub += GetSubMenu("", Convert.ToInt32(dataRow["CateNewsID"].ToString()), groupcate, cID); strMenuSub += "</div>"; strMenuSub += "</li>"; } strMenuSub += "</ul>"; } } return(strMenuSub); }