Exemple #1
0
 void GetListColor()
 {
     if (HienThiMau())
     {
         pnMauTrainTicket.Visible  = true;
         pnMauTrainTicket1.Visible = true;
         fields    = DataExtension.GetListColumns(GroupsColumns.VgnameColumn, GroupsColumns.IgidColumn, GroupsColumns.VgparamsColumn);
         condition = GroupsTSql.GetGroupsCondition(language, CodeApplications.TrainTicketColors, "0", " IGENABLE <> '2' ");
         orderby   = GroupsColumns.IgorderColumn;
         DataTable dt = new DataTable();
         dt = Groups.GetGroups(top, fields, condition, orderby);
         rblColors.Items.Clear();
         rblColors1.Items.Clear();
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             rblColors.Items.Add(new ListItem("<span style='width:20px;height:20px;border:solid 1px #000;display:inline-block;background:#" + dt.Rows[i][GroupsColumns.VgparamsColumn].ToString() + "'><!----></span> " + dt.Rows[i][GroupsColumns.VgnameColumn].ToString(), dt.Rows[i][GroupsColumns.IgidColumn].ToString()));
             rblColors1.Items.Add(new ListItem("<span style='width:20px;height:20px;border:solid 1px #000;display:inline-block;background:#" + dt.Rows[i][GroupsColumns.VgparamsColumn].ToString() + "'><!----></span> " + dt.Rows[i][GroupsColumns.VgnameColumn].ToString(), dt.Rows[i][GroupsColumns.IgidColumn].ToString()));
         }
     }
     else
     {
         pnMauTrainTicket.Visible  = false;
         pnMauTrainTicket1.Visible = false;
     }
 }
    protected void OnExport()
    {
        DataSet   ds = new DataSet();
        DataTable dt = new DataTable();
        //Lấy id của các mục được chọn
        string listID = "";

        for (int i = 0; i <= RpListLanguageNationals.Items.Count - 1; i++)
        {
            CheckBox chkItem = (CheckBox)RpListLanguageNationals.Items[i].FindControl(("chk_item"));
            if (chkItem != null)
            {
                if (chkItem.Checked == true)
                {
                    listID += "," + chkItem.ToolTip;
                }
            }
        }

        string condition = LanguageKeyColumns.iLanguageKeyId + " in(0" + listID + ")";
        string fields    = DataExtension.GetListColumns(LanguageKeyColumns.nLanguageKeyTitle, LanguageKeyColumns.nLanguageKeyDesc);

        #region OrderBy
        string orderBy = LanguageKeyColumns.nLanguageKeyTitle;

        #endregion
        dt = LanguageKey.GetLanguageKey("", fields, condition, orderBy);
        //Dat lai ten cho cac cot
        dt.Columns[0].ColumnName = "Mã từ khoá";
        dt.Columns[1].ColumnName = "Mô tả";
        ds.Tables.Add(dt.Copy());
        ExportExcel1.DSSource = ds;
    }
    void GetItemsInfo()
    {
        fields = DataExtension.GetListColumns(ItemsColumns.VititleColumn, ItemsColumns.DicreatedateColumn);
        DataTable dt = new DataTable();

        dt = TatThanhJsc.Database.Items.GetItems("", "*", ItemsTSql.GetItemsByIid(iid), "");
        #region ThongTinCoBan
        ltrHotelName.Text = @"
<div class='fwb'>
    Thông tin :
</div>
<div class='cbh20'><!----></div>
<div class='fwb'>
    " + dt.Rows[0][ItemsColumns.VititleColumn].ToString() + @"
</div>
<div class='cbh5'><!----></div>
<div style='font:11px Tahoma;color:#0e0e0e;'>
    Ngày đăng: " + ((DateTime)dt.Rows[0][ItemsColumns.DicreatedateColumn]).ToString("dd/MM/yyyy") + @" - Lượt xem: " + dt.Rows[0][ItemsColumns.IitotalviewColumn].ToString() + @"
</div>
<div class='cbh5'><!----></div>
<div style='font:12px/18px Tahoma;color:#000;'>
    " + dt.Rows[0][ItemsColumns.VicontentColumn].ToString() + @"
</div>
<div class='cbh20'><!----></div>
";
        #endregion
    }
Exemple #4
0
 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();
         }
     }
 }
Exemple #5
0
    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);

        if (dt.Rows.Count > 0)
        {
            s += @"
      <div class='blog socical-top'>
        <ul>
          " + GetListAdv(dt.Rows[0][GroupsColumns.IgidColumn].ToString(), cssImage) + @"
        </ul>
      </div>";
        }

        return(s);
    }
Exemple #6
0
    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);

        if (go == RewriteExtension.FileLibrary)
        {
            return("");
        }
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            string link  = UrlExtension.WebisteUrl + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn].ToString().ToLower() + RewriteExtension.Extensions;
            string title = dt.Rows[i][GroupsColumns.VgnameColumn].ToString();
            s += @"<li><a href='" + link + "'>" + title + @"</a></li>";
        }

        return(s);
    }
Exemple #7
0
    void LayLienKetBaoGom()
    {
        string app       = CodeApplications.TourService;
        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);

        cblBaoGom.DataSource     = dt;
        cblBaoGom.DataTextField  = GroupsColumns.VgnameColumn;
        cblBaoGom.DataValueField = GroupsColumns.IgidColumn;
        cblBaoGom.DataBind();

        cblKhongBaoGom.DataSource     = dt;
        cblKhongBaoGom.DataTextField  = GroupsColumns.VgnameColumn;
        cblKhongBaoGom.DataValueField = GroupsColumns.IgidColumn;
        cblKhongBaoGom.DataBind();
        //Ban đầu check tất cả các items ở mục không bao gồm
        for (int i = 0; i < cblKhongBaoGom.Items.Count; i++)
        {
            cblKhongBaoGom.Items[i].Selected = true;
        }
    }
Exemple #8
0
    string GetList()
    {
        string s = "";

        string condition = GroupsTSql.GetGroupsByVgapp(app);

        if (igid != "")
        {
            condition = GroupsItemsTSql.GetItemsInGroupCondition(igid, "");
        }

        condition = DataExtension.AndConditon(condition,
                                              GroupsTSql.GetGroupsByVglang(lang),
                                              GroupsTSql.GetGroupsByIgenable("1"),
                                              ItemsTSql.GetItemsByIienable("1"),
                                              ItemsTSql.GetItemsByViapp(app));
        if (iid != "")
        {
            condition += " and ITEMS.IID<> " + iid + " ";
        }

        string fields = DataExtension.GetListColumns(ItemsColumns.VititleColumn, ItemsColumns.IitotalviewColumn,
                                                     ItemsColumns.VISEOLINKSEARCHColumn, ItemsColumns.DicreatedateColumn, ItemsColumns.ViImage, ItemsColumns.VidescColumn);

        string orderby = ItemsColumns.IiorderColumn + "," + ItemsColumns.DicreatedateColumn + " desc ";

        try
        {
            rows = int.Parse(SettingsExtension.GetSettingKey(maxItemKey, lang));
        }
        catch { }

        DataTable dt = new DataTable();

        dt = GroupsItems.GetAllData(rows.ToString(), fields, condition, orderby);
        if (dt.Rows.Count > 0)
        {
            string link = "";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                link = (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower();
                s   += @"
        <div class='item'>
          <div class='item-img'>
            <a href='" + link + @"' title='" + dt.Rows[i][ItemsColumns.VititleColumn] + @"' class='imgc'>
              " + ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViimageColumn].ToString(), dt.Rows[i][ItemsColumns.VititleColumn].ToString(), "", true, false, "") + @"
            </a>
          </div>
          <div class='item-body'>
            <a href='" + link + @"' class='title item-title customer-name' title='" + dt.Rows[i][ItemsColumns.VititleColumn] + @"'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</a>
            <p class='item-text'>
              " + dt.Rows[i][ItemsColumns.VidescColumn] + @"
            </p>
          </div>
        </div>";
            }
        }
        return(s);
    }
Exemple #9
0
    private string LayLienKetDiemDenSeQua_Cap2(string parentId, string parentLevel)
    {
        string s         = "";
        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(parentId),
            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++)
        {
            s += @"
<div class='dest" + parentLevel + @"'>
    <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>";
        }

        return(s);
    }
Exemple #10
0
    string GetList3(string igid, string top)
    {
        string s = "";

        #region Condition, orderby, fields
        string condition = "";

        if (igid != "")
        {
            condition = GroupsItemsTSql.GetItemsInGroupCondition(igid, "");
        }
        else
        {
            condition = GroupsTSql.GetGroupsByVgapp(app);
        }
        condition = DataExtension.AndConditon(
            condition,
            GroupsTSql.GetGroupsByVglang(lang),
            GroupsTSql.GetGroupsByIgenable("1"),
            ItemsTSql.GetItemsByIienable("1"),
            ItemsTSql.GetItemsByViapp(app));

        if (key.Length > 0)
        {
            condition = DataExtension.AndConditon(condition, SearchTSql.GetSearchMathedCondition(key, ItemsColumns.VititleColumn, ItemsColumns.VikeyColumn, ItemsColumns.FipriceColumn, ItemsColumns.FisalepriceColumn));
        }

        string orderby = ItemsColumns.IiorderColumn + "," + ItemsColumns.DicreatedateColumn + " desc ";

        string fields = DataExtension.GetListColumns(ItemsColumns.VititleColumn,
                                                     ItemsColumns.ViimageColumn, ItemsColumns.VISEOLINKSEARCHColumn, ItemsColumns.VidescColumn, ItemsColumns.DiCreateDate, ItemsColumns.IiTotalView);
        #endregion

        DataTable dt = GroupsItems.GetAllData("3", "*", condition, orderby);

        #region Lấy ra danh sách bài viết
        if (dt.Rows.Count > 0)
        {
            string link = (UrlExtension.WebisteUrl + dt.Rows[0][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                link =
                    (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions)
                    .ToLower();
                s += @"
                <div class='list-price__item fade-up'>
                    <h3 class='list-price__ttl'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</h3>
                    <p class='list-price__price'>  " + dt.Rows[i][ItemsColumns.ViDesc] + @"</p>
                     " + StringExtension.LayChuoi(dt.Rows[i][ItemsColumns.VicontentColumn].ToString(), "", 1) + @"
                </div>";
            }
        }
        #endregion

        return(s);
    }
Exemple #11
0
    protected void BtnLogin_Click(object sender, EventArgs e)
    {
        top       = "1";
        fields    = DataExtension.GetListColumns(UsersColumns.UseridColumn, UsersColumns.UseremailColumn);
        condition = TatThanhJsc.TSql.UsersTSql.GetUsersByUsername(TbAccount.Text);
        orderby   = "";
        DataTable dt = new DataTable();

        dt = TatThanhJsc.Database.Users.GetUsers(top, fields, condition, orderby);
        if (dt.Rows.Count > 0)
        {
            string clientIP = "";
            clientIP = Request.UserHostAddress;
            string ipAddress = "";
            ipAddress = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName()).GetValue(0).ToString();
            string NewPassword = (clientIP + DateTime.Now.ToString());
            NewPassword = SecurityExtension.BuildPassword(NewPassword);
            NewPassword = NewPassword.Substring(0, 8);
            string RoadLinkConfirm = SecurityExtension.BuildPassword(ipAddress + NewPassword);

            string values = UsersColumns.UserpasswordsaltColumn + "=N'" +
                            (NewPassword + TatThanhJsc.AdminModul.Keyword.ParamsSpilitItems + RoadLinkConfirm +
                             TatThanhJsc.AdminModul.Keyword.ParamsSpilitItems + "0") + "'";
            string conditionUpdate = TatThanhJsc.TSql.UsersTSql.GetUsersByUsername(TbAccount.Text);


            TatThanhJsc.Database.Users.UpdateUsers(values, conditionUpdate);
            string ContentEmail = "";
            ContentEmail = @"
<div>Xin chào bạn!</div>
<br />
<div>Chúng tôi đã nhận được yêu cầu khôi phục mật khẩu tại website " + UrlExtension.WebisteUrl + @"</div>
<div>Thông tin mật khẩu mới như sau:</div>
<div>
    <ul>
        <li>Tài khoản: " + TbAccount.Text + @"</li>
        <li>Mật khẩu mới: " + NewPassword + @"</li>
    </ul>
</div>
<br />
<div>Nếu bạn không yêu cầu khôi phục mật khẩu, bạn không cần làm gì nữa.</div>
<div>Nếu bạn muốn khôi phục mật khẩu, vui lòng kích vào đường link dưới đây để kích hoạt mật khẩu mới!</div>
<div>" + UrlExtension.WebisteUrl + "cms/admin/OtherControls/ConfirmPassword.aspx?Account=" + TbAccount.Text + "&Confirm=" + RoadLinkConfirm + @"</div>
";

            EmailExtension.SendEmail(dt.Rows[0][UsersColumns.UseremailColumn].ToString(), "Khôi phục mật khẩu website: " + UrlExtension.WebisteUrl, ContentEmail);
            ScriptManager.RegisterStartupScript(this, GetType(), "ResetPassword", "alert('Đã gửi mật khẩu mới tới email " + dt.Rows[0][UsersColumns.UseremailColumn].ToString() + ", vui lòng kích hoạt mật khẩu mới tại địa chỉ email của bạn!');", true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('Tài khoản không đúng!');", true);
            TbAccount.Text = "";
            return;
        }
    }
Exemple #12
0
    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.IgtotalitemsColumn, GroupsColumns.VGSEOMETACANONICALColumn);

        DataTable dt = Groups.GetGroups("", fields, condition, GroupsColumns.IgorderColumn);

        string list = "";
        string cate = "";

        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 < 1)
            {
                list = GetList(dt.Rows[i][GroupsColumns.VGSEOMETACANONICALColumn].ToString(),
                               dt.Rows[i][GroupsColumns.IgtotalitemsColumn].ToString());
            }

            cate = GetCate(dt.Rows[i][GroupsColumns.VGSEOMETACANONICALColumn].ToString());

            s += @"
      <div class='section " + (i % 2 == 0 ? "stfirst" : "") + @" tour-cat'>
        <div class='container'>
          <div class='list'>
            <h2>
              <a href='" + UrlExtension.WebisteUrl + StringExtension.LayChuoi(cate, "", 3) + RewriteExtension.Extensions + @"' class='title list-title txtCenter fSize-34 fSize-sm-26 nb-color-m1' title='" + StringExtension.LayChuoi(cate, "", 1) + @"'><span>" + StringExtension.LayChuoi(cate, "", 1) + @"</span></a>
            </h2>
            <p class='list-text hed txtCenter'>" + StringExtension.LayChuoi(cate, "", 2) + @"</p>
            <div class='list-body'>
              <div class='wap clearfix'>
                " + list + @"
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class='container'>
        <hr>
      </div>";
        }

        return(s);
    }
Exemple #13
0
    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);
    }
    /// <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, GroupsColumns.VgdescColumn);

        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 < 1)
            {
                list = GetLastest(dt.Rows[i][GroupsColumns.IgtotalitemsColumn].ToString());
            }

            link = UrlExtension.WebisteUrl + rewrite + RewriteExtension.Extensions;

            s += @"
      <div class='section stlast customer_say'>
        <div class='container'>
          <div class='list'>
            <h2>
              <a href='" + link + @"' class='title list-title txtCenter fSize-34 nb-color-m1' title='" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"'>" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"</a>
            </h2>
            <p class='list-text hed txtCenter'>" + dt.Rows[i][GroupsColumns.VgdescColumn] + @"</p>
            <div class='list-body'>
              <div class='slick-slider' data-slick='{""slidesToShow"": 3, ""slidesToScroll"": 1, ""autoplay"": true, ""dots"": false, ""arrows"":true, ""responsive"": [{""breakpoint"":1025,""settings"":{""slidesToShow"": 2}},{""breakpoint"":768,""settings"": {""slidesToShow"": 1}}]}'>
                " + list + @" 
              </div>
            </div>
          </div>
        </div>
      </div>";
        }

        return(s);
    }
    void GetItemsInfo()
    {
        fields = DataExtension.GetListColumns(ItemsColumns.VititleColumn, ItemsColumns.FipriceColumn, ItemsColumns.FisalepriceColumn);
        DataTable dt = new DataTable();

        dt = TatThanhJsc.Database.Items.GetItems("", fields, ItemsTSql.GetItemsByIid(iid), "");
        #region ThongTinCoBan
        ltrName.Text = @"
<div class='fwb'>
    Tên deal: " + dt.Rows[0][ItemsColumns.VititleColumn].ToString() + @"
</div>
<div class='cbh20'><!----></div>
";
        #endregion
    }
    void GetTitleItem()
    {
        fields    = DataExtension.GetListColumns(TatThanhJsc.Columns.ItemsColumns.VititleColumn, TatThanhJsc.Columns.ItemsColumns.DicreatedateColumn);
        condition = ItemsTSql.GetItemsByIid(iid);
        DataTable dt = new DataTable();

        dt = GroupsItems.GetAllData(top, fields, condition, orderBy);
        if (dt.Rows.Count > 0)
        {
            LtTitlePage.Text  = dt.Rows[0]["VITITLE"].ToString();
            lt_cate_name.Text = @"
<div class='TitleItem'>Tên Vé tàu: " + dt.Rows[0]["VITITLE"].ToString() + @"</div>
<div>Ngày đăng: " + TimeExtension.FormatTime(dt.Rows[0][TatThanhJsc.Columns.ItemsColumns.DicreatedateColumn], "dd/MM/yyyy") + @"</div>";
        }
    }
Exemple #17
0
    void GetCate()
    {
        DataTable dt = new DataTable();

        fields    = " * ";
        condition = GroupsTSql.GetGroupsCondition(language, Modul, "", " IGENABLE <> '2' ");
        orderBy   = DataExtension.GetListColumns(GroupsColumns.VgparamsColumn, GroupsColumns.IgorderColumn);
        dt        = Groups.GetGroups(top, fields, condition, orderBy);

        if (dt.Rows.Count > 0)
        {
            LtCates.Text += "<div id=\"CateOrder-0\" >";
            LtCates.Text += DisplayCate(dt);
            LtCates.Text += "</div>";
        }
    }
    protected void lnk_delete_user_checked_Click(object sender, EventArgs e)
    {
        string ArrayId = "";

        for (int i = 0; i <= rptList.Items.Count - 1; i++)
        {
            CheckBox chkDelete = (CheckBox)rptList.Items[i].FindControl(("chk_item"));
            if (chkDelete != null)
            {
                if (chkDelete.Checked)
                {
                    ArrayId += chkDelete.ToolTip;
                    ArrayId += ",";
                }
            }
            else
            {
                return;
            }
        }
        if (ArrayId.Length > 0)
        {
            ArrayId = ArrayId.Substring(0, (ArrayId.Length - 1));
        }
        else
        {
            return;
        }

        char[] splitItem = { ',' };


        fields    = DataExtension.GetListColumns(SubitemsColumns.IsidColumn, SubitemsColumns.VsimageColumn);
        condition = " ISID in(" + ArrayId + ") ";
        DataTable dt = new DataTable();

        dt = Subitems.GetSubItems("", fields, condition, "");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            ImagesExtension.DeleteImageWhenDeleteItem(pathFolderPic, dt.Rows[i][SubitemsColumns.VsimageColumn].ToString());
            Subitems.DeleteSubitems(dt.Rows[i][SubitemsColumns.IsidColumn].ToString());
        }

        chk_list.Checked = false;
        GetList();
    }
    /// <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);
    }
    /// <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-carpark'>
        " + list + @"
    </div>
";
        }

        return(s);
    }
    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();
    }
Exemple #22
0
    void LayThuocTinh()
    {
        string app       = CodeApplications.TourProperty;
        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++)
        {
            ddlDiemDen.Items.Add(new ListItem(dt.Rows[i][GroupsColumns.VgnameColumn].ToString(), dt.Rows[i][GroupsColumns.IgidColumn].ToString()));
        }
    }
    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);
    }
    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()));
        }
    }
Exemple #25
0
    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);
    }
    private object GetImagesInAlbum(string albumId)
    {
        string s = "";

        string condition = DataExtension.AndConditon(
            SubitemsTSql.GetSubitemsByIid(albumId),
            SubitemsTSql.GetSubitemsByIsenable("1"),
            SubitemsTSql.GetSubitemsByVskey(CodeApplications.PhotoAlbumImagesOther));
        DataTable dt      = new DataTable();
        string    fields  = DataExtension.GetListColumns(SubitemsColumns.VsimageColumn, SubitemsColumns.VstitleColumn);
        string    orderby = SubitemsColumns.VsemailColumn + " asc," + SubitemsColumns.VsatuthorColumn + " asc";

        dt = Subitems.GetSubItems("6", "*", condition, orderby);

        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                s += @"
   <div class='list-carpark__item fade-up'>
        <div class='img'>
            <a href='' class='img__crop'>
               " + ImagesExtension.GetImage(pic, dt.Rows[i][SubitemsColumns.VsimageColumn].ToString(),
                                            dt.Rows[i][SubitemsColumns.VstitleColumn].ToString(), "", true, false, "", false) + @"
            </a>
        </div>
        <div class='list-carpark__content'>
            <h3 class='list-carpark__ttl'>
                <a href=''>" + dt.Rows[i][SubitemsColumns.VstitleColumn].ToString() + @"</a>
            </h3>
            <p class='txtBase'>" + dt.Rows[i][SubitemsColumns.VscontentColumn].ToString() + @"</p>
        </div>
    </div>";
            }
        }

        return(s);
    }
    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);
    }
Exemple #28
0
    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);
    }
    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);
    }
    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();
    }