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 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); }
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); }
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); }
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"); } }
//private void GetCateParentNewsGroup(int cId, int gId) //{ // string strCate = this.GetCateParentIDArrayByID(cId, gId); // NewsGroupBSO newsGroupBSO = new NewsGroupBSO(); // DataTable newsGroupPaging = newsGroupBSO.GetNewsGroupPaging(Language.language, Convert.ToInt32(hddGroupCate.Value), strCate, _page); // if (newsGroupPaging.Rows.Count > 0) // { // TotalRecord = Convert.ToInt32(newsGroupPaging.Rows[0]["Total"].ToString()); // SetAttributeGvArticle(Convert.ToInt32(newsGroupPaging.Rows[0]["Total"].ToString())); // rptListNewsGroup.DataSource = newsGroupPaging; // rptListNewsGroup.DataBind(); // Paging.DataLoad(); // if (TotalPage(Convert.ToInt32(newsGroupPaging.Rows[0]["Total"].ToString())) <= 1L) // { // Paging.Visible = false; // } // else // { // Paging.Visible = true; // } // } // else // { // SetAttributeGvArticle(0); // Paging.Visible = false; // } // //CateNewsBSO cateNewsBSO = new CateNewsBSO(); // //DataTable cateClientGroup = cateNewsBSO.getCateClientGroup(cId, Language.language, gId, 5); // //if (cateClientGroup.Rows.Count > 0) // //{ // // tintuc_col1.Attributes.Add("class", "tintuc-col1"); // // ViewListCate(cId, gId); // //} // //else // //{ // // tintuc_col1.Attributes.Add("class", "tintuc-col-main"); // //} // PagingInfo paging = new PagingInfo(10, (Convert.ToInt32(hdnPage.Value) + 1), true); // DataTable newsGroupPaging2 = newsGroupBSO.GetNewsGroupPaging(Language.language, Convert.ToInt32(hddGroupCate.Value), paging); // if (newsGroupPaging2.Rows.Count > 0) // { // newsOther.Visible = true; // rptListNewsOther.DataSource = newsGroupPaging2; // rptListNewsOther.DataBind(); // return; // } // newsOther.Visible = false; //} private void ViewListCate(int cId, int gId) { //Cate CateNewsBSO cateNewsBSO = new CateNewsBSO(); DataTable tblCateClient = new DataTable(); if (!AspNetCache.CheckCache("tblCateClient_" + gId + "_" + cId)) { tblCateClient = cateNewsBSO.getCateClientGroupUrl(cId, Language.language, gId, 4); AspNetCache.SetCacheWithTime("tblCateClient_" + gId + "_" + cId, tblCateClient, 150.0); } else { tblCateClient = (DataTable)AspNetCache.GetCache("tblCateClient_" + gId + "_" + cId); } string strCateSub = ""; if (tblCateClient.Rows.Count > 0) { strCateSub += "<div class='r-ro'>"; for (int i = 0; i < tblCateClient.Rows.Count; i++) { DataRow dataRow = tblCateClient.Rows[i]; if (Convert.ToBoolean(dataRow["isUrl"])) { strCateSub += "<a class='catelink' href='" + dataRow["Url"] + "' title='" + dataRow["CateNewsName"] + "'>" + dataRow["ShortName"] + "</a>"; } else { strCateSub += "<a class='catelink' href='" + ResolveUrl("~/") + "c3/" + cateNewsBSO.GetSlugByCateId(Convert.ToInt32(dataRow["CateNewsID"])) + "/" + GetString(dataRow["CateNewsName"]) + "-" + dataRow["GroupCate"] + "-" + dataRow["CateNewsID"].ToString() + ".aspx' title='" + dataRow["CateNewsName"] + "'>" + dataRow["ShortName"] + "</a>"; } //if (i < tblCateClient.Rows.Count - 1) // strCateSub += "<span class='catelink-line'> </span>"; } strCateSub += "</div>"; ltlCateLink.Text = strCateSub; } else { ltlCateLink.Visible = false; } //GetNews DataTable table = new DataTable(); if (!AspNetCache.CheckCache("HTML_AboutTabListbyCate_" + gId + "_" + cId)) { NewsGroupBSO newsGroupBSO = new NewsGroupBSO(); if (cId == 0) { table = newsGroupBSO.GetNewsGroupHot(Language.language, "1", gId); } else { table = newsGroupBSO.GetNewsGroupByCateHotAll(cId, gId, "1", "1", "1"); } AspNetCache.SetCacheWithTime("HTML_AboutTabListbyCate_" + gId + "_" + cId, table, 150.0); } else { table = (DataTable)AspNetCache.GetCache("HTML_AboutTabListbyCate_" + gId + "_" + cId); } if (table.Rows.Count > 0) { DataTable tableHot = table.Clone(); DataTable tableOther = table.Clone(); //SubCate if (tblCateClient.Rows.Count == 0 || tblCateClient == null) { for (int i = 0; i < table.Rows.Count; i++) { if (i < 4) { tableHot.ImportRow(table.Rows[i]); } else { tableOther.ImportRow(table.Rows[i]); } } string strTabNews = ""; if (tableHot.Rows.Count > 0) { strTabNews += "<div class='tab_title-tabdetail'>"; strTabNews += "<ul id='detailtabs' class='tabdetail'>"; for (int i = 0; i < tableHot.Rows.Count; i++) { DataRow row = tableHot.Rows[i]; strTabNews += "<li><a href='' rel='detail_news_" + i + "' class='selected'>"; strTabNews += row["ShortTitle"]; strTabNews += "</a></li>"; } strTabNews += "</ul>"; strTabNews += "</div> "; for (int i = 0; i < tableHot.Rows.Count; i++) { DataRow row = tableHot.Rows[i]; strTabNews += "<div id='detail_news_" + i + "' class='tabcontent-detail'>"; strTabNews += "<div class='main-tab-vanban-detail'>"; strTabNews += row["FullDescribe"]; strTabNews += "</div>"; strTabNews += "</div>"; } } newsTabList.Text = strTabNews; } else //CateParent { for (int i = 0; i < table.Rows.Count; i++) { if (i < 1) { tableHot.ImportRow(table.Rows[i]); } else { tableOther.ImportRow(table.Rows[i]); } } string newsdetail = ""; if (tableHot.Rows.Count > 0) { DataRow row = tableHot.Rows[0]; newsdetail += "<h1 class='news-title-detail'>"; newsdetail += row["Title"]; newsdetail += "</h1>"; newsdetail += "<div class='news-detail-ct'>"; newsdetail += "<p>"; newsdetail += row["FullDescribe"]; newsdetail += "</p>"; newsdetail += "</div>"; } newsTabList.Text = newsdetail; } if (tableOther.Rows.Count > 0) { newsOther.Visible = true; rptListNewsOther.DataSource = tableOther; rptListNewsOther.DataBind(); } else { newsOther.Visible = false; } } else { newsOther.Visible = false; } DataTable table1 = new DataTable(); if (!AspNetCache.CheckCache("HTML_AboutTabListbyCate1_" + gId + "_" + cId)) { NewsGroupBSO newsGroupBSO = new NewsGroupBSO(); if (cId == 0) { table1 = newsGroupBSO.GetNewsGroupHot(Language.language, "1", "0", gId); } else { table1 = newsGroupBSO.GetNewsGroupByCateHotAll(cId, gId, "1", "1", "0"); } AspNetCache.SetCacheWithTime("HTML_AboutTabListbyCate1_" + gId + "_" + cId, table1, 150.0); } else { table1 = (DataTable)AspNetCache.GetCache("HTML_AboutTabListbyCate1_" + gId + "_" + cId); } if (table1.Rows.Count > 0) { newsOther1.Visible = true; rptNewsOther1.DataSource = table1; rptNewsOther1.DataBind(); } else { newsOther1.Visible = false; } }
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); }