void GetNicks() { if (TrainTicketConfig.KeyHienThiAddNickChoTrainTicket) { fields = "*"; condition = DataExtension.AndConditon ( GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.OtherModul.CodeApplications.SupportOnline), ItemsTSql.GetItemsByIienable("1") ); orderBy = " Groups.igid asc, " + GroupsItemsColumns.IorderColumn + " asc "; DataTable dt = new DataTable(); dt = GroupsItems.GetAllData("", fields, condition, orderBy); rptNicks.DataSource = dt; rptNicks.DataBind(); } }
void LayLienKetPhuongTien() { string app = CodeApplications.TourVehicle; string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn); string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgparentid("0"), GroupsTSql.GetGroupsByVglang(lang), GroupsColumns.IgenableColumn + "<>2" ); string orderBy = GroupsColumns.IgorderColumn + "," + GroupsColumns.VgnameColumn; DataTable dt = Groups.GetGroups("", fields, condition, orderBy); cblPhuongTien.DataSource = dt; cblPhuongTien.DataTextField = GroupsColumns.VgnameColumn; cblPhuongTien.DataValueField = GroupsColumns.IgidColumn; cblPhuongTien.DataBind(); }
void GetProperties() { if (TrainTicketConfig.KeyHienThiQuanLyThuocTinhTrainTicket) { fields = "*"; condition = DataExtension.AndConditon ( GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(propertyModul), " IGENABLE <> '2' " ); orderBy = GroupsColumns.IgorderColumn; DataTable dt = new DataTable(); dt = Groups.GetGroups("", fields, condition, orderBy); rptProperties.DataSource = dt; rptProperties.DataBind(); } }
private string GetFirstCateId() { string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVglang(lang) ); string order = GroupsColumns.IgorderColumn; DataTable dt = Groups.GetGroups("1", "*", condition, order); if (dt.Rows.Count > 0) { return(dt.Rows[0][GroupsColumns.IgId].ToString()); } return("0"); }
protected string GetDivColor(string igidColor) { condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByIgid(igidColor), GroupsTSql.GetGroupsByVgapp(CodeApplications.DealColors)); fields = GroupsColumns.VgparamsColumn; DataTable dt = new DataTable(); dt = Groups.GetGroups("", fields, condition, ""); if (dt.Rows.Count > 0) { return("<span style='width:15px;height:15px;display:inline-block;border:solid 1px #000;background:#" + dt.Rows[0][GroupsColumns.VgparamsColumn].ToString() + "'><!----></span>"); } else { return(" "); } }
/// <summary> /// Lấy danh sách các nhóm /// </summary> /// <returns></returns> private string GetGroups(string position) { string s = ""; string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVgapp(appGroup), GroupsTSql.GetGroupsByVglang(lang), GroupsTSql.GetGroupsByVgparams(position) ); string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn, GroupsColumns.VGSEOLINKSEARCHColumn, GroupsColumns.IgtotalitemsColumn); DataTable dt = Groups.GetGroups("", fields, condition, GroupsColumns.IgorderColumn); string list = ""; string link = ""; for (int i = 0; i < dt.Rows.Count; i++) { list = GetList(dt.Rows[i][GroupsColumns.IgidColumn].ToString(), dt.Rows[i][GroupsColumns.IgtotalitemsColumn].ToString()); if (list.Length > 0) { link = UrlExtension.WebisteUrl + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn].ToString().ToLower() + RewriteExtension.Extensions; } else//Nếu không có tin --> lấy tự động tin mới { link = UrlExtension.WebisteUrl + rewrite + RewriteExtension.Extensions; list = GetLastest(dt.Rows[i][GroupsColumns.IgtotalitemsColumn].ToString()); } s += @" <h2 class='ttl-comp03 fade-up'>" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"</h2> <div class='list-program'> " + list + @" </div>"; } return(s); }
void GetListItem(string Modul) { string iid_inListAdded = ""; fields = " * "; condition = GroupsItemsTSql.GetGroupsItemsByIgid(igid); DataTable dtProductInCate = new DataTable(); dtProductInCate = GroupsItems.GetAllData(top, fields, condition, " IORDER ASC, DCREATEDATE DESC "); if (dtProductInCate.Rows.Count > 0) { for (int i = 0; i < dtProductInCate.Rows.Count; i++) { lstadded.Items.Add(new ListItem(dtProductInCate.Rows[i]["VITITLE"].ToString(), dtProductInCate.Rows[i]["IID"].ToString())); iid_inListAdded += dtProductInCate.Rows[i]["IID"].ToString(); if (i != (dtProductInCate.Rows.Count - 1)) { iid_inListAdded += ","; } } } DataTable dt = new DataTable(); condition = GroupsTSql.GetGroupsByVglang(language); if (Modul.Length > 0) { condition = DataExtension.AndConditon(condition, GroupsTSql.GetGroupsByVgapp(Modul), ItemsTSql.GetItemsByViapp(Modul)); } if (!iid_inListAdded.Equals("")) { condition += "and ITEMS.IID not in(" + iid_inListAdded + ")"; } condition += " AND IGENABLE <> '2' AND IIENABLE <> '2' "; dt = GroupsItems.GetAllData("", "*", condition, " IORDER ASC, DCREATEDATE DESC "); for (int i = 0; i < dt.Rows.Count; i++) { lstnotadded.Items.Add(new ListItem(dt.Rows[i]["VITITLE"].ToString(), dt.Rows[i]["IID"].ToString())); } }
/// <summary> /// Lấy thông tin bản đồ. Hiện Hoà đang cho lấy bản đồ của phòng ban đầu tiên /// </summary> void GetMapInfo() { string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVglang(lang), GroupsTSql.GetGroupsByIgparentid("0") ); string order = GroupsColumns.IgorderColumn; DataTable dt = Groups.GetGroups("1", "*", condition, order); if (dt.Rows.Count > 0) { string content = dt.Rows[0][GroupsColumns.VgcontentColumn].ToString(); ltrOfficeInfo.Text = @" <h2 class='contact02__ttl fade-up'>" + dt.Rows[0][GroupsColumns.VgnameColumn].ToString() + @"</h2> <ul> <li class=' fade-up'> <span class='icon'> <img src='/img/contact/ico-01.png' alt=''> </span> <p><span>Địa chỉ</span><br> " + StringExtension.LayChuoi(content, "", 1) + @" </p> </li> <li class=' fade-up'> <span class='icon'><img src='/img/contact/ico-02.png' alt=''></span> <p><span>Email</span><br> <a href='mailto:" + StringExtension.LayChuoi(content, "", 4) + @"'>" + StringExtension.LayChuoi(content, "", 4) + @"</a> </p> </li> <li class=' fade-up'> <span class='icon'><img src='/img/contact/ico-03.png' alt=''></span> <p><span>Hotline</span><br> <a href='tel:" + StringExtension.LayChuoi(content, "", 8) + @"'>" + StringExtension.LayChuoi(content, "", 8) + @"</a> </p> </li> </ul> "; } }
void GetGroupsInDdl() { DataTable dt = new DataTable(); fields = "*"; condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(app), " IGENABLE <> 2 "); orderBy = ""; dt = Groups.GetAllGroups(fields, condition, orderBy); if (dt.Rows.Count > 0) { ddl_group_ontab.Items.Add(new ListItem(Developer.QAKeyword.TatCaDanhMuc, "")); for (int i = 0; i < dt.Rows.Count; i++) { ddl_group_ontab.Items.Add(new ListItem(TatThanhJsc.Extension.DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i]["IGID"].ToString())); } } }
void GetGroupsInDdl() { DataTable dt = new DataTable(); fields = "*"; condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(app), " IGENABLE <> 2 "); orderBy = ""; dt = Groups.GetAllGroups(fields, condition, orderBy); ddlCateSearch.Items.Add(new ListItem(Developer.NewKeyword.TatCaDanhMuc, "")); for (int i = 0; i < dt.Rows.Count; i++) { ddlCateSearch.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i]["IGID"].ToString())); } ddlCateSearch.SelectedValue = igid; }
/// <summary> /// Hiện thị các tag cho 1 blog /// </summary> /// <param name="iid"></param> /// <returns></returns> private static string ShowTags(string iid) { string s = ""; string condition = DataExtension.AndConditon( GroupsItemsTSql.GetGroupsItemsByIid(iid), GroupsTSql.GetGroupsByVgapp(TatThanhJsc.OtherModul.CodeApplications.Tag)); DataTable dt = GroupsItems.GetAllData("", "groups.*", condition, GroupsColumns.IgorderColumn); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { s += "<a href='" + (UrlExtension.WebisteUrl + RewriteExtension.Tag + "/" + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower() + "' title='" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"'>" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"</a>, "; } s = s.Remove(s.Length - ", ".Length); } return(s); }
private void LoadDestCate() { ddlCateDest.Items.Clear(); condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVglang(ddlLanguageDest.SelectedValue), GroupsTSql.GetGroupsByVgapp(ddlModulDest.SelectedValue) ); DataTable dt = new DataTable(); fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn, GroupsColumns.IglevelColumn); dt = Groups.GetAllGroups(fields, condition, ""); for (int i = 0; i < dt.Rows.Count; i++) { ddlCateDest.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i][GroupsColumns.IglevelColumn].ToString()) + dt.Rows[i][GroupsColumns.VgnameColumn].ToString(), dt.Rows[i][GroupsColumns.IgidColumn].ToString())); } }
void GetGroupsInDdl() { DataTable dt = new DataTable(); condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(app), " igenable <> '2' "); dt = Groups.GetAllGroups("*", condition, ""); DdlGroupTrainTicket.Items.Clear(); DdlGroupTrainTicket.Items.Add(new ListItem("Danh mục gốc", "0")); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { DdlGroupTrainTicket.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i]["IGID"].ToString())); } } DdlGroupTrainTicket.SelectedValue = hd_parent; }
void LoadContactDetailContent(string iid) { top = ""; fields = "*"; condition = DataExtension.AndConditon(ItemsTSql.GetItemsByIid(iid), GroupsTSql.GetGroupsByVgapp(modul)); orderby = ""; DataTable dt = TatThanhJsc.Database.GroupsItems.GetAllData(top, fields, condition, orderby); if (dt.Rows.Count > 0) { ltrHoten.Text = dt.Rows[0][ItemsColumns.ViauthorColumn].ToString(); ltrEmail.Text = dt.Rows[0][ItemsColumns.VidescColumn].ToString(); ltrDiaChi.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.ViparamsColumn].ToString(), "", 2); ltrDienthoai.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.ViparamsColumn].ToString(), "", 1); ltrGuiDen.Text = dt.Rows[0][GroupsColumns.VgnameColumn].ToString(); ltrTieuDe.Text = dt.Rows[0][ItemsColumns.VititleColumn].ToString(); ltrNoiDung.Text = dt.Rows[0][ItemsColumns.VicontentColumn].ToString(); ltrGuiLuc.Text = ((DateTime)dt.Rows[0][ItemsColumns.DicreatedateColumn]).ToString("dd/MM/yyyy hh:mm:ss tt"); } }
private string GetGroupsAdv(string position, string cssImage) { string s = ""; string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn); string orderby = GroupsColumns.IgorderColumn; string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVgparams(position), GroupsTSql.GetGroupsByVglang(lang) ); DataTable dt = new DataTable(); dt = Groups.GetGroups("", fields, condition, orderby); for (int i = 0; i < dt.Rows.Count; i++) { s += GetListAdv(dt.Rows[i][GroupsColumns.IgidColumn].ToString(), cssImage); } return(s); }
void LayThuocTinh() { string app = CodeApplications.CruisesProperty; string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn, GroupsColumns.VgimageColumn); string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgparentid("0"), GroupsTSql.GetGroupsByVglang(lang), GroupsColumns.IgenableColumn + "<>2" ); string orderBy = GroupsColumns.IgorderColumn + "," + GroupsColumns.VgnameColumn; DataTable dt = Groups.GetGroups("", fields, condition, orderBy); for (int i = 0; i < dt.Rows.Count; i++) { cblThuocTinh.Items.Add( new ListItem( ImagesExtension.GetImage(pic, dt.Rows[i][GroupsColumns.VgimageColumn].ToString(), dt.Rows[i][GroupsColumns.VgnameColumn].ToString(), "imgProp", false, false, "") + dt.Rows[i][GroupsColumns.VgnameColumn].ToString(), dt.Rows[i][GroupsColumns.IgidColumn].ToString())); } }
/// <summary> /// Lấy thông tin bản đồ. Hiện Hoà đang cho lấy bản đồ của phòng ban đầu tiên /// </summary> void GetMapInfo() { string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVglang(lang), GroupsTSql.GetGroupsByIgparentid("0") ); string order = GroupsColumns.IgorderColumn; DataTable dt = Groups.GetGroups("1", "*", condition, order); if (dt.Rows.Count > 0) { string content = dt.Rows[0][GroupsColumns.VgcontentColumn].ToString(); Lng = StringExtension.LayChuoi(content, "", 5); Lat = StringExtension.LayChuoi(content, "", 6); InfoWindow = dt.Rows[0][GroupsColumns.VgName].ToString(); ltrMaps.Text = dt.Rows[0][GroupsColumns.VgParams].ToString(); } }
private void LayLienKetDiemDenSeQua() { string app = TatThanhJsc.DestinationModul.CodeApplications.Destination; string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn, GroupsColumns.IglevelColumn); string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgparentid("0"), GroupsTSql.GetGroupsByVglang(lang), GroupsColumns.IgenableColumn + "<>2" ); string orderBy = GroupsColumns.IgorderColumn + "," + GroupsColumns.VgnameColumn; DataTable dt = Groups.GetGroups("", fields, condition, orderBy); for (int i = 0; i < dt.Rows.Count; i++) { ltrCacDiemDenChuaChon.Text += @" <div class='dest0'> <label for='cbd_0_" + dt.Rows[i][GroupsColumns.IgidColumn] + "'><input id='cbd_0_" + dt.Rows[i][GroupsColumns.IgidColumn] + "' type='checkbox'/>" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"</label> " + LayLienKetDiemDenSeQua_Cap2(dt.Rows[i][GroupsColumns.IgidColumn].ToString(), dt.Rows[i][GroupsColumns.IglevelColumn].ToString()) + @" </div>"; } }
private string GetGroupsAdv(string position, string cssImage) { string s = ""; string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn, GroupsColumns.VgdescColumn); string orderby = GroupsColumns.IgorderColumn; string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVgparams(position), GroupsTSql.GetGroupsByVglang(lang) ); DataTable dt = new DataTable(); dt = Groups.GetGroups("", fields, condition, orderby); if (dt.Rows.Count > 0) { s += @" <div class='section about-us'> <div class='container'> <div class='list'> <h2> <a href='#' class='title list-title txtCenter fSize-34 fSize-sm-26 nb-color-m1'>" + dt.Rows[0][GroupsColumns.VgnameColumn].ToString() + @"</a> </h2> <p class='list-text hed txtCenter'>" + dt.Rows[0][GroupsColumns.VgdescColumn].ToString() + @"</p> <div class='list-body'> <div class='row'> " + GetListAdv(dt.Rows[0][GroupsColumns.IgidColumn].ToString(), cssImage) + @" </div> </div> </div> </div> </div>"; } return(s); }
private string GetCateRoads(string igParentId) { string s = ""; string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByVglang(lang), "charindex(','+cast(" + GroupsColumns.IgidColumn + " as varchar)+',','" + igParentId + "')>0" //Lấy danh sách cha của cate hiện tại ); string orderby = "len(" + GroupsColumns.IgparentsidColumn + ")"; //Order theo chiều dài của trường danh sách cha để các cate cha hiện trước string fields = DataExtension.GetListColumns(GroupsColumns.VgnameColumn, GroupsColumns.VGSEOLINKSEARCHColumn); DataTable dt = Groups.GetGroups("", fields, condition, orderby); for (int i = 0; i < dt.Rows.Count; i++) { s += "<li class='element'><a class='link' href='" + UrlExtension.WebisteUrl + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn].ToString().ToLower() + RewriteExtension.Extensions + "' title='" + dt.Rows[i][GroupsColumns.VgnameColumn] + "'><span>" + dt.Rows[i][GroupsColumns.VgnameColumn] + "</span><i class='fa fa-angle-right' aria-hidden='true'></i></a></li>"; } return(s); }
private string GetCate(string igid) { string s = ""; string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByVglang(lang), GroupsTSql.GetGroupsByIgid(igid) ); string fields = DataExtension.GetListColumns(GroupsColumns.VgnameColumn, GroupsColumns.VgdescColumn, GroupsColumns.VGSEOLINKSEARCHColumn); string orderby = GroupsColumns.IgOrder + " desc "; DataTable dt = Groups.GetGroups("1", fields, condition, orderby); if (dt.Rows.Count > 0) { s = StringExtension.GhepChuoi("", dt.Rows[0][GroupsColumns.VgnameColumn].ToString(), dt.Rows[0][GroupsColumns.VgdescColumn].ToString(), dt.Rows[0][GroupsColumns.VGSEOLINKSEARCHColumn].ToString()); } return(s); }
public string GetSubCate(string igparentid) { top = ""; fields = " * "; condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByIgparentid(igparentid), " IGENABLE <> '2' "); orderBy = " IGORDER ASC "; DataTable dt = new DataTable(); dt = Groups.GetGroups(top, fields, condition, orderBy); string s = ""; if (dt.Rows.Count > 0) { s += "<div id=\"CateOrder-" + igparentid + "\" >"; TxtLevel += "..."; s += DisplaySubCate(dt, igparentid); s += "</div>"; TxtLevel = TxtLevel.Remove(TxtLevel.Length - "...".Length); } return(s); }
void LayLienKetBaoGom() { string app = CodeApplications.HotelFacilityRoom; string fields = DataExtension.GetListColumns(GroupsColumns.IgidColumn, GroupsColumns.VgnameColumn); string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgparentid("0"), GroupsTSql.GetGroupsByVglang(lang), GroupsColumns.IgenableColumn + "<>2" ); string orderBy = GroupsColumns.IgorderColumn + "," + GroupsColumns.VgnameColumn; DataTable dt = Groups.GetGroups("", fields, condition, orderBy); //DataRow dr = dt.NewRow(); //dr[0] = "0"; //dr[1] = "Chọn/bỏ tất cả"; //dt.Rows.InsertAt(dr,0); cblBaoGom.DataSource = dt; cblBaoGom.DataTextField = GroupsColumns.VgnameColumn; cblBaoGom.DataValueField = GroupsColumns.IgidColumn; cblBaoGom.DataBind(); }
string StatusGroupParent(string igparentid) { string str = ""; top = " 1 "; fields = " * "; condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVgapp(Modul), GroupsTSql.GetGroupsByIgid(igparentid)); orderBy = ""; DataTable dt = new DataTable(); dt = Groups.GetGroups("1", "*", condition, orderBy); if (igparentid.Equals("0")) { str = "1"; } else if (dt.Rows.Count > 0) { str = dt.Rows[0]["IGENABLE"].ToString(); } return(str); }
void GetGroupsInDdl() { DataTable dt = new DataTable(); dt = Groups.GetAllGroups("*", DataExtension.AndConditon(GroupsTSql.GetGroupsByVgapp(app) + " AND IGENABLE <> '2' ", GroupsTSql.GetGroupsByVglang(language)), ""); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { ddl_group_product.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i]["IGID"].ToString())); } } if (!igid.Equals("")) { ddl_group_product.SelectedValue = igid; } #region Hiển thị các danh mục ra checkboxlist for (int i = 0; i < dt.Rows.Count; i++) { cbListCates.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"], dt.Rows[i]["IGID"].ToString())); } #endregion }
private void GetAllTag() { condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgparentid("0"), GroupsTSql.GetGroupsByIgenable("1") ); if (ddlTagModul.SelectedValue.Length > 0) { condition = DataExtension.AndConditon(condition, GroupsTSql.GetGroupsByVgparams(ddlTagModul.SelectedValue)); } fields = DataExtension.GetListColumns(GroupsColumns.VgnameColumn, GroupsColumns.IgidColumn); orderby = GroupsColumns.VgnameColumn; DataTable dt = new DataTable(); dt = Groups.GetGroups("", fields, condition, orderby); cblListTag.DataSource = dt; cblListTag.DataTextField = GroupsColumns.VgnameColumn; cblListTag.DataValueField = GroupsColumns.IgidColumn; cblListTag.DataBind(); }
protected string LoadMenu() { string top = ""; string field = "*"; string condition = DataExtension.AndConditon( GroupsTSql.GetGroupsByVgapp(app), GroupsTSql.GetGroupsByIgparentid("0"), GroupsTSql.GetGroupsByIgenable("1"), GroupsTSql.GetGroupsByVglang(lang)); string orderby = GroupsColumns.IgorderColumn; DataTable dt = Groups.GetGroups(top, field, condition, orderby); string s = ""; if (dt.Rows.Count > 0) { string link = ""; string subMenus = ""; for (int i = 0; i < dt.Rows.Count; i++) { link = RewriteExtension.GetLinkMenu(dt.Rows[i][GroupsColumns.VgdescColumn].ToString()); subMenus = LoadChildMenu(dt.Rows[i][GroupsColumns.IgidColumn].ToString(), dt.Rows[i][GroupsColumns.VgdescColumn].ToString(), "", "1"); s += @" <li class='litop item " + (subMenus != "" ? "nb-dropdown" : "") + @"'> <a class='item-link' href='" + link + @"' " + MenuExtension.GetTarget(dt.Rows[i][GroupsColumns.VgparamsColumn].ToString()) + @" title='" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"'> <span>" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"</span> </a> " + subMenus + @" </li>"; } } return(s); }
void InitialControlsValue(bool insert) { #region update if (!insert) { btn_insert_update.Text = "Đồng ý"; ckbContinue.Visible = false; fields = "*"; condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVgapp(app), ItemsTSql.GetItemsByIid(iid)); DataTable dt = new DataTable(); dt = GroupsItems.GetAllData(top, fields, condition, orderBy); lnk_delete_Image_current.Visible = true; ddl_group_product.SelectedValue = dt.Rows[0]["IGID"].ToString(); txt_title.Text = dt.Rows[0]["VITITLE"].ToString(); txt_description.Text = dt.Rows[0]["VIDESC"].ToString(); txt_content.Text = dt.Rows[0]["VICONTENT"].ToString(); hdOldService.Value = dt.Rows[0]["VICONTENT"].ToString(); #region SEO textLinkRewrite.Text = dt.Rows[0]["VISEOLINK"].ToString(); textTagTitle.Text = dt.Rows[0]["VISEOTITLE"].ToString(); textTagKeyword.Text = dt.Rows[0]["VISEOMETAKEY"].ToString(); textTagDescription.Text = dt.Rows[0]["VISEOMETADESC"].ToString(); #endregion txtCreateDate.Text = dt.Rows[0]["DCREATEDATE"].ToString(); #region Image if (!dt.Rows[0]["VIIMAGE"].ToString().Equals("")) { ltimg.Text = TatThanhJsc.Extension.ImagesExtension.GetImage(pic, dt.Rows[0]["VIIMAGE"].ToString(), "", "imgItem", false, false, "", false); lnk_delete_Image_current.Visible = true; } else { ltimg.Visible = false; lnk_delete_Image_current.Visible = false; } hd_img.Value = dt.Rows[0]["VIIMAGE"].ToString(); if (hd_img.Value.Length < 1) { cbLayAnhTuNoiDung.Checked = true; } else { cbLayAnhTuNoiDung.Checked = false; } #endregion HdIitotalview.Value = dt.Rows[0]["IITOTALVIEW"].ToString(); #region IIENABLE if (dt.Rows[0]["IIENABLE"].ToString().Equals("0")) { chk_status.Checked = false; } else { chk_status.Checked = true; } #endregion tbKey.Text = dt.Rows[0][ItemsColumns.VikeyColumn].ToString(); tbOrder.Text = dt.Rows[0][ItemsColumns.IiorderColumn].ToString(); tbDanhSachTepDinhKem.Text = dt.Rows[0][ItemsColumns.ViurlColumn].ToString(); #region ThuocTinhDichVu-Chi thực hiện khi chức năng Quản lý thuộc tính được hiển thị if (ServiceConfig.KeyHienThiQuanLyThuocTinhDichVu) { string properties = ""; condition = TatThanhJsc.Extension.DataExtension.AndConditon( TatThanhJsc.TSql.SubitemsTSql.GetSubitemsByIid(iid), TatThanhJsc.TSql.SubitemsTSql.GetSubitemsByVskey(propertyModul)); fields = SubitemsColumns.VscontentColumn; dt = Subitems.GetSubItems("", fields, condition, ""); if (dt.Rows.Count > 0) { properties = dt.Rows[0][SubitemsColumns.VscontentColumn].ToString(); } for (int i = 0; i < rptProperties.Items.Count; i++) { CheckBox checkBoxProperties = (CheckBox)rptProperties.Items[i].FindControl("checkBoxProperties"); if (properties.IndexOf(parramSpitString + checkBoxProperties.ToolTip + parramSpitString) > -1) { checkBoxProperties.Checked = true; } else { checkBoxProperties.Checked = false; } } } #endregion } #endregion #region insert else { btn_insert_update.Text = "Đồng ý"; txtCreateDate.Text = DateTime.Now.ToString(); txt_title.Focus(); } #endregion }
void GetGroupsPhotoAlbum() { fields = " * "; string conditionItem = ""; conditionItem = TatThanhJsc.Extension.DataExtension.AndConditon(GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(app)); if (!ddl_type_groupnew_show.SelectedValue.Equals("")) { conditionItem += " AND VGPARAMS = " + ddl_type_groupnew_show.SelectedValue; } DataTable dt_Groups = new DataTable(); dt_Groups = Groups.GetAllGroups(fields, conditionItem, ""); if (dt_Groups.Rows.Count > 0) { for (int i = 0; i < dt_Groups.Rows.Count; i++) { condition = GroupsItemsTSql.GetItemsInGroupCondition(dt_Groups.Rows[i]["IGID"].ToString(), " [GROUPS_ITEMS].IID = '" + iid + "' "); DataTable dt = new DataTable(); dt = GroupsItems.GetAllData(top, fields, condition, orderBy); if (dt.Rows.Count > 0) { lstadded.Items.Add(new ListItem(dt_Groups.Rows[i]["VGNAME"].ToString(), dt_Groups.Rows[i]["IGID"].ToString())); } else { lstnotadded.Items.Add(new ListItem(dt_Groups.Rows[i]["VGNAME"].ToString(), dt_Groups.Rows[i]["IGID"].ToString())); } } } }
void InitialControlsValue(bool insert) { #region update if (!insert) { LtInsertUpdate.Text = Developer.TourKeyword.CapNhatBaiViet; btOK.Text = "Đồng ý"; cbTiepTuc.Visible = false; string fields = "*"; string condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVgapp(appCate), ItemsTSql.GetItemsByIid(iid)); DataTable dt = GroupsItems.GetAllData("1", fields, condition, ""); hdGroupsItemId.Value = dt.Rows[0][GroupsItemsColumns.IgiidColumn].ToString(); ddlParentCate.SelectedValue = dt.Rows[0]["IGID"].ToString(); tbTenTour.Text = dt.Rows[0][ItemsColumns.VititleColumn].ToString(); tbMaTour.Text = dt.Rows[0][ItemsColumns.VikeyColumn].ToString(); flAnhDaiDien.Load(dt.Rows[0][ItemsColumns.ViimageColumn].ToString()); tbMoTa.Text = dt.Rows[0][ItemsColumns.VidescColumn].ToString(); tbGiaNiemYet.Text = dt.Rows[0][ItemsColumns.FipriceColumn].ToString(); tbGiaKhuyenMai.Text = dt.Rows[0][ItemsColumns.FisalepriceColumn].ToString(); tbNgayKhoiHanh.Text = dt.Rows[0][ItemsColumns.VISEOMETAPARAMSColumn].ToString(); tbXuatPhat.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VicontentColumn].ToString(), "", 1); tbPhuongTien.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VicontentColumn].ToString(), "", 2); tbYoutubeEmbed.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VicontentColumn].ToString(), "", 3); tbMaDinhKemBanDoTour.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VicontentColumn].ToString(), "", 4); tbGioKhoiHanh.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VicontentColumn].ToString(), "", 5); #region SEO tbSeoLink.Text = dt.Rows[0]["VISEOLINK"].ToString(); tbSeoTitle.Text = dt.Rows[0]["VISEOTITLE"].ToString(); tbSeoKeyword.Text = dt.Rows[0]["VISEOMETAKEY"].ToString(); tbSeoDescription.Text = dt.Rows[0]["VISEOMETADESC"].ToString(); #endregion tbThuTu.Text = dt.Rows[0][ItemsColumns.IiorderColumn].ToString(); cbTrangThai.Checked = (dt.Rows[0][ItemsColumns.IienableColumn].ToString() == "1"); tbNgayDang.Text = dt.Rows[0][ItemsColumns.DicreatedateColumn].ToString(); hdTotalView.Value = dt.Rows[0][ItemsColumns.IitotalviewColumn].ToString(); tbGiaChoNguoiLon.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VISEOMETACANONICALColumn].ToString(), "", 1); tbGiaChoTreViThanhNien.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VISEOMETACANONICALColumn].ToString(), "", 2); tbGiaChoTreEm.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VISEOMETACANONICALColumn].ToString(), "", 3); tbGiaChoEmBe.Text = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.VISEOMETACANONICALColumn].ToString(), "", 4); ddlThoiGianTour.SelectedValue = dt.Rows[0][ItemsColumns.ViurlColumn].ToString(); ddlDiemDen.SelectedValue = dt.Rows[0][ItemsColumns.ViauthorColumn].ToString(); } #endregion #region insert else { LtInsertUpdate.Text = Developer.TourKeyword.ThemMoiBaiViet; btOK.Text = "Đồng ý"; tbNgayDang.Text = DateTime.Now.ToString(); tbTenTour.Focus(); } #endregion }