public static string GetPropertyIcon(string iid, string propertyApp, string pic) { string s = ""; string lang = TatThanhJsc.LanguageModul.Cookie.GetLanguageValueDisplay(); string condition = DataExtension.AndConditon( GroupsTSql.GetByApp(propertyApp), GroupsTSql.GetByEnable("1"), GroupsTSql.GetByLang(lang), ItemsTSql.GetItemsByIid(iid)); DataTable dt = GroupsItems.GetAllData("", GroupsColumns.VgimageColumn + "," + GroupsColumns.VgnameColumn, condition, GroupsColumns.IgorderColumn); if (dt.Rows.Count > 0) { s += "<span class='propertyIcons'>"; for (int i = 0; i < dt.Rows.Count; i++) { s += ImagesExtension.GetImage(pic, dt.Rows[i][GroupsColumns.VgimageColumn].ToString(), dt.Rows[i][GroupsColumns.VgnameColumn].ToString(), "propertyIcon", false, false, ""); } s += "</span>"; } return(s); }
private void GetCateInfo() { if (Session["dataByTitle_Cate"] != null) { DataTable dt = (DataTable)Session["dataByTitle_Cate"]; if (dt.Rows.Count > 0) { ltrCateName.Text = dt.Rows[0][GroupsColumns.VgName].ToString(); ltrCateDesc.Text = dt.Rows[0][GroupsColumns.VgDesc].ToString(); } } else { string condition = DataExtension.AndConditon( GroupsTSql.GetByApp(app), GroupsTSql.GetByEnable("1"), GroupsTSql.GetByLang(lang), GroupsTSql.GetByParentId("0") ); string fields = DataExtension.GetListColumns(GroupsColumns.VgName, GroupsColumns.VgDesc); string orderby = GroupsColumns.DgCreateDate + " desc"; DataTable dt = Groups.GetGroups("1", fields, condition, orderby); if (dt.Rows.Count > 0) { ltrCateName.Text = dt.Rows[0][GroupsColumns.VgName].ToString(); ltrCateDesc.Text = dt.Rows[0][GroupsColumns.VgDesc].ToString(); } } }
private string LoadTitle() { string s = ""; string orderby = GroupsColumns.IgOrder; string condition = DataExtension.AndConditon( GroupsTSql.GetByLang(lang), GroupsTSql.GetByApp(app), GroupsTSql.GetByEnable("1") ); DataTable dt = new DataTable(); dt = Groups.GetGroups("", "*", condition, orderby); if (dt.Rows.Count > 0) { string img = ImagesExtension.GetImage(pic, dt.Rows[0][GroupsColumns.VgImage].ToString(), dt.Rows[0][GroupsColumns.VgName].ToString(), "", true, false, "");; string desc = dt.Rows[0][GroupsColumns.VgDesc].ToString(); s += @" <div class='nguoihoro'> <div class='khungAnh'> <a class='khungAnhCrop'>" + img + @"</a> </div> <div class='tthotro'> <a class='trtt'>" + LanguageItemExtension.GetnLanguageItemTitleByName("Hỗ trợ trực tuyến") + @"</a> <div class='vuilong'> " + desc + @" </div> </div> </div>"; } return(s); }
private string GetCateInfo() { string s = ""; if (Session["dataByTitle_Cate"] != null) { DataTable dt = (DataTable)Session["dataByTitle_Cate"]; if (dt.Rows.Count > 0) { s += @" <div class='banner tour'> <div class='body'> <h1> <a href='#' class='title fSize-42 fSize-md-30 fSize-sm-26 txtCenter'> <span>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgName].ToString()) + @"</span> </a> </h1> <p class='text txtCenter nb-color-m0'>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgDesc].ToString()) + @"</p> </div> </div>"; } } else { string condition = DataExtension.AndConditon( GroupsTSql.GetByApp(app), GroupsTSql.GetByEnable("1"), GroupsTSql.GetByLang(lang), GroupsTSql.GetByParentId("0") ); string fields = DataExtension.GetListColumns(GroupsColumns.VgName, GroupsColumns.VgDesc); string orderby = GroupsColumns.DgCreateDate + " desc"; DataTable dt = Groups.GetGroups("1", fields, condition, orderby); if (dt.Rows.Count > 0) { s += @" <div class='banner tour'> <div class='body'> <h1> <a href='#' class='title fSize-42 fSize-md-30 fSize-sm-26 txtCenter'> <span>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgName].ToString()) + @"</span> </a> </h1> <p class='text txtCenter nb-color-m0'>" + (page == "d" ? "" : dt.Rows[0][GroupsColumns.VgDesc].ToString()) + @"</p> </div> </div>"; } } return(s); }
private string GetFirtIGID() { string s = ""; string condition = DataExtension.AndConditon( GroupsTSql.GetByApp(CodeApplications.Contact), GroupsTSql.GetByEnable("1"), GroupsTSql.GetByLevel("1"), GroupsTSql.GetByLang(lang) ); DataTable dt = Groups.GetGroups("1", GroupsColumns.IgidColumn, condition, GroupsColumns.IgorderColumn); if (dt.Rows.Count > 0) { s = dt.Rows[0][GroupsColumns.IgidColumn].ToString(); } return(s); }
/// <summary> /// Lấy danh sách các nhóm /// </summary> /// <returns></returns> private string GetGroups(string position) { string s = ""; string fields = "", condition = "", orderby = ""; condition = DataExtension.AndConditon( GroupsTSql.GetByParams(position), GroupsTSql.GetByEnable("1"), GroupsTSql.GetByApp(appGroup), GroupsTSql.GetByLang(lang) ); fields = DataExtension.GetListColumns( GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn, GroupsColumns.VgimageColumn, GroupsColumns.VGSEOLINKSEARCHColumn, GroupsColumns.IgtotalitemsColumn ); orderby = GroupsColumns.IgorderColumn; DataTable dt = Groups.GetGroups("", fields, condition, orderby); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { string list = ""; string cateName = ""; list = GetList(dt.Rows[i][GroupsColumns.IgidColumn].ToString(), "5"); // tieu de string link = "", name = ""; link = (UrlExtension.WebisteUrl + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower(); name = dt.Rows[i][GroupsColumns.VgnameColumn].ToString(); if (list.Length > 0) { ltrList.Text = @" <div class='main-right'> <span class='btn-comp01 fade-up'><b>" + name + @"</b></span> <div class='list-news03'> " + list + @" </div> </div>"; } } } return(s); }