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); }
string LayLinkCate(string igid) { string s = ""; string condition = DataExtension.AndConditon( GroupsTSql.GetByApp(app), GroupsTSql.GetById(igid), GroupsTSql.GetByLang(lang) ); string fields = DataExtension.GetListColumns(GroupsColumns.VGSEOLINKSEARCHColumn); DataTable dt = Groups.GetGroups("1", fields, condition, GroupsColumns.DgCreateDate + " desc"); if (dt.Rows.Count > 0) { s = (UrlExtension.WebisteUrl + dt.Rows[0][GroupsColumns.VGSEOLINKSEARCHColumn].ToString() + RewriteExtension.Extensions).ToLower(); } return(s); }
string LayThoiGianTour(string igid) { string s = ""; DataTable dt = new DataTable(); string fields = " * "; string condition = DataExtension.AndConditon( GroupsTSql.GetByApp(CodeApplications.TourVehicle), GroupsTSql.GetGroupsByIgid(igid), GroupsTSql.GetByLang(lang) ); string orderBy = GroupsColumns.IgorderColumn + "," + GroupsColumns.VgnameColumn; dt = Groups.GetGroups("1", fields, condition, orderBy); if (dt.Rows.Count > 0) { s = dt.Rows[0][GroupsColumns.VgName].ToString(); } return(s); }
private void LoadListSlider(string position, string cssImage) { //get data // lấy danh sách group có vị trí xác định string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn); string orderBy = GroupsColumns.IgorderColumn; string condition = DataExtension.AndConditon(GroupsTSql.GetByApp(app), GroupsTSql.GetByLang(lang), GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVgparams(position), GroupsTSql.GetByLang(lang)); DataTable dt = Groups.GetGroups("1", fields, condition, orderBy); if (dt.Rows.Count.Equals(0)) { return; } string igid = ""; // items info string title = ""; string img = ""; string href = ""; string viparams = ""; string target = ""; string content = ""; string strList = ""; for (int i = 0; i < dt.Rows.Count; i++) { igid = dt.Rows[i][GroupsColumns.IgidColumn].ToString(); // getListItem DataTable dataItems = GroupsItems.GetAllData("1", " * ", GroupsItemsTSql.GetItemsInGroupCondition(igid, ItemsTSql.GetItemsByIienable("1")), GroupsItemsColumns.IorderColumn); if (dt.Rows.Count.Equals(0)) { continue; } else { string s = ""; for (int j = 0; j < dataItems.Rows.Count; j++) { title = dataItems.Rows[j][ItemsColumns.VititleColumn].ToString(); viparams = dataItems.Rows[j][ItemsColumns.ViparamsColumn].ToString(); if (viparams.Equals("1")) { target = "target='_blank'"; } else { target = ""; } href = dataItems.Rows[j][ItemsColumns.ViurlColumn].ToString(); img = ImagesExtension.SetTypeImageAdvertising("1", pic, dataItems.Rows[j][ItemsColumns.ViimageColumn].ToString(), title, "", "", cssImage, false); content = dataItems.Rows[j][ItemsColumns.VISEOTITLEColumn].ToString(); ltrAdv.Text = @" <a href='" + href + "' title='" + title + @"' class='logo'> " + img + @" </a>"; } } } //// render //ltrAdv.Text = "<ul class='khoi1170'>" + strList + "</ul>"; }