示例#1
0
    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.ProductKeyword.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;
    }
    void GetProductGroups(string IgidInDll)
    {
        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();
        string    conditionItem = "";

        conditionItem = DataExtension.AndConditon(GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(Modul), ItemsTSql.GetItemsByViapp(Modul));
        if (!iid_inListAdded.Equals(""))
        {
            conditionItem += "and ITEMS.IID not in(" + iid_inListAdded + ")";
        }

        if (!IgidInDll.Equals(""))
        {
            conditionItem += " AND " + GroupsItemsTSql.GetItemsInGroupCondition(IgidInDll, "") + " ";
        }
        conditionItem += " AND IGENABLE <> '2' AND IIENABLE <> '2' ";
        dt             = GroupsItems.GetAllData("", "*", conditionItem, " 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()));
        }
    }
    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 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.ServiceKeyword.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()));
            }
        }
    }
示例#6
0
    void LayDanhSachTour(string igid, string iid)
    {
        string condition = DataExtension.AndConditon(
            GroupsItemsTSql.GetItemsInGroupCondition(igid, ""),
            GroupsTSql.GetGroupsByVglang(lang),
            GroupsTSql.GetGroupsByIgenable("1"),
            ItemsTSql.GetItemsByIienable("1"),
            ItemsTSql.GetItemsByViapp(TatThanhJsc.TourModul.CodeApplications.Tour));

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

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

        for (int i = 0; i < dt.Rows.Count; i++)
        {
            ddlChuyenDi.Items.Add(new ListItem(dt.Rows[i][ItemsColumns.VititleColumn].ToString(), dt.Rows[i][ItemsColumns.IidColumn].ToString()));
        }

        ddlChuyenDi.SelectedValue = iid;
    }
    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()));
        }
    }
示例#8
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);
    }
示例#9
0
    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>";
        }
    }
示例#10
0
    /// <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 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);
    }
    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();
    }
示例#14
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);
    }
    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);
    }
示例#16
0
    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);
    }
示例#17
0
    /// <summary>
    /// Lấy các thông tin items, groups theo title, ưu tiên tìm items trước groups, dữ liệu sẽ lưu vào Session["dataByTitle"], đồng thời xác định igid hoặc iid và go
    /// </summary>
    void GetItemsOrGroupsInfoByTitle()
    {
        #region Xóa các session cũ
        //Các Session lưu lại các thông tin để ko cần mất công lấy lại lần nữa tại các modul
        //Session["igid"]: igid hiện tại
        //Session["iid"]: iid hiện tại
        //Session["rewrite"]: RewriteExtension. hiện tại, vd: RewriteExtension.Product
        //Session["app"]: modul hiện tại: vd: TatThanhJsc.ProductModul.CodeApplications.Product
        //Session["apptitle"]: Tiêu đề modul hiện tại: vd: "Sản phẩm"
        //Session["vititle"]: vititle hiện tại
        //Session["vilink"]: link seo hiện tại của items
        //Session["dataByTitle"]: lưu dữ liệu tìm thấy theo title để khi vào trang chi tiết không cần lấy lại
        Session["go"]   = null;
        Session["igid"] = null; Session["iid"] = null; Session["rewrite"] = null;
        Session["app"]  = null; Session["apptitle"] = null; Session["vititle"] = null; Session["vilink"] = null;
        Session["MultipPageContent"] = null;
        Session["dataByTitle"]       = null;
        Session["dataByTitle_Cate"]  = null;//Lưu danh mục đang chứa items hiện tại
        igid = iid = "";
        #endregion

        if (Request.QueryString["title"] != null)
        {
            #region Kiểm tra trước xem có items theo title này không
            string    condition = ItemsTSql.GetItemsByVilang(lang);
            DataTable dt        = RewriteExtension.GetItemsByTitle(title, ItemsTSql.GetItemsByIienable("1"));

            if (dt.Rows.Count > 0)
            {
                Session["dataByTitle"] = dt;

                Session["iid"] = dt.Rows[0][ItemsColumns.IidColumn].ToString();
                Session["go"]  = GetGoByApp(dt.Rows[0][ItemsColumns.ViappColumn].ToString());

                //Lấy thông tin Groups của Items, có lưu Session["igid"]
                GetGroupsInfoByItemId(dt.Rows[0][ItemsColumns.IidColumn].ToString(), dt.Rows[0][ItemsColumns.ViappColumn].ToString());

                return;//Nếu có items rồi thì không cần kiểm tra groups nữa
            }
            #endregion

            #region Kiểm tra xem có groups theo title này không - chỉ kiểm tra khi không có items

            condition = DataExtension.AndConditon(
                GroupsTSql.GetGroupsByVglang(lang),
                GroupsTSql.GetGroupsByIgenable("1"),
                //CMS mới bỏ phần trang nội dung ở menu nên không tìm theo menu nữa
                GroupsColumns.VgappColumn + "<>'" + TatThanhJsc.MenuModul.CodeApplications.MenuMain + "'",
                GroupsColumns.VgappColumn + "<>'" + TatThanhJsc.MenuModul.CodeApplications.MenuBottom + "'",
                GroupsColumns.VgappColumn + "<>'" + TatThanhJsc.MenuModul.CodeApplications.MenuOther + "'",
                GroupsColumns.VgappColumn + "<>'" + TatThanhJsc.MenuModul.CodeApplications.MenuTop + "'"
                );
            dt = RewriteExtension.GetGroupsByTitle(title, condition);
            if (dt.Rows.Count > 0)
            {
                Session["dataByTitle"]      = dt;
                Session["dataByTitle_Cate"] = dt;

                Session["igid"] = dt.Rows[0][GroupsColumns.IgidColumn].ToString();
                Session["go"]   = GetGoByApp(dt.Rows[0][GroupsColumns.VgappColumn].ToString());

                #region Phục vụ xử lý trong trang giới thiệu
                if (StringExtension.LayChuoi(dt.Rows[0][GroupsColumns.VgparamsColumn].ToString(), "", 4) == "1")
                {
                    Session["MultipPageContent"] = "1"; //Trang giới thiệu đa cấp
                }
                else
                {
                    Session["MultipPageContent"] = null;
                }
                #endregion
            }
            #endregion
        }

        //Trường hợp vào trang chủ modul
        if (Session["dataByTitle"] == null)
        {
            Session["go"] = GetAppByGo(Request.QueryString["go"]);
        }
    }
    void GetService(string order)
    {
        DdlListShowItem.SelectedValue = NumberShowItem;
        if (!igid.Equals(""))
        {
            ddl_group_ontab.SelectedValue = igid;
            conditionItems = GroupsItemsTSql.GetItemsInGroupCondition(ddl_group_ontab.SelectedValue, "");
        }
        else
        {
            conditionItems = DataExtension.AndConditon(
                "VGAPP = '" + app + "'",
                GroupsTSql.GetGroupsByVglang(language));
        }
        conditionItems = DataExtension.AndConditon(conditionItems, ItemsTSql.GetItemsByViapp(app));

        #region Lọc với tính năng duyệt tin
        if (ServiceConfig.KeyDuyetTin)
        {
            pnStatus.Visible = false;
            keyHide          = "dn";
            string userId = CookieExtension.GetCookies("userId");
            if (HorizaMenuConfig.ShowDuyetTin1 || HorizaMenuConfig.ShowDuyetTin2)
            {
                conditionItems += " AND VIURL = '" + userId + "' ";
            }
        }
        #endregion

        conditionItems += " AND IIENABLE = '2' ";
        if (txt_key.Text.Length > 0 && !txt_key.Text.Equals(strdisplay))
        {
            SearchCondition = " AND " + SearchTSql.GetSearchMathedCondition(txt_key.Text, ItemsColumns.VititleColumn);
        }
        if (txt_key.Text.Equals(strdisplay))
        {
            txt_key.Text = "";
        }
        if (order.Length > 0)
        {
            orderBy = order;
        }
        else
        {
            orderBy = CookieExtension.GetCookiesSort(sortCookiesName);
            if (orderBy.Length < 1)
            {
                orderBy = " DCREATEDATE DESC ";
            }
        }

        DataSet ds = new DataSet();
        ds = GroupsItems.GetAllDataPagging(p, NumberShowItem, conditionItems + SearchCondition, orderBy);
        DataTable dt = new DataTable();
        dt = ds.Tables[1];

        LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]),
                                                     Convert.ToInt16(NumberShowItem), Convert.ToInt32(p),
                                                     LinkAdmin.UrlAdmin(CodeApplications.Service, TypePage.RecycleItem,
                                                                        ddl_group_ontab.SelectedValue, txt_key.Text,
                                                                        NumberShowItem), "currentPS", "otherPS", "firstPS",
                                                     "lastPS", "previewPS", "nextPS");
        rp_mn_users.DataSource = ds.Tables[0];
        rp_mn_users.DataBind();
    }
示例#19
0
    void GetNew(string order)
    {
        if (!modul.Equals(""))
        {
            condition = DataExtension.AndConditon(
                "VGAPP = '" + modul + "'",
                GroupsTSql.GetGroupsByVglang(language));
        }
        else
        {
            condition = DataExtension.AndConditon(
                DataExtension.OrConditon(
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.AboutUsModul.CodeApplications.AboutUs),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.AdvertisingModul.CodeApplications.Advertising),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.ProductModul.CodeApplications.Product),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.DealModul.CodeApplications.Deal),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.FileLibraryModul.CodeApplications.FileLibrary),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.ServiceModul.CodeApplications.Service),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.NewsModul.CodeApplications.News),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.PhotoAlbumModul.CodeApplications.PhotoAlbum),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.VideoModul.CodeApplications.Video),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.QAModul.CodeApplications.QA),
                    GroupsTSql.GetGroupsByVgapp(TatThanhJsc.CustomerReviewsModul.CodeApplications.CustomerReviews)
                    ),
                GroupsTSql.GetGroupsByVglang(language));
        }

        #region Hiển thị bài đã duyệt theo trạng thái phân quyền
        string userRole = CookieExtension.GetCookies("RolesUser");
        if (HorizaMenuConfig.ShowDuyetTin2)
        {
            if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap2, userRole))
            {
                #region Với tài khoản cấp 2 (trưởng ban biên tập)
                condition += " AND IIENABLE = '" + PhanQuyen.DuyetTin.Cap2 + "' ";
                #endregion
            }
            else if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap3, userRole))
            {
                #region Với tài khoản cấp 3 (tổng biên tập)
                condition += " AND IIENABLE = '1' ";
                #endregion
            }
        }
        else if (HorizaMenuConfig.ShowDuyetTin1)
        {
            if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap3, userRole))
            {
                #region Với tài khoản cấp 3 (tổng biên tập)
                condition += " AND IIENABLE = '1' ";
                #endregion
            }
        }
        #endregion

        if (!title.Equals(""))
        {
            condition += " AND " + SearchTSql.GetSearchMathedCondition(title, ItemsColumns.VititleColumn);
        }

        if (!DateFrom.Equals(""))
        {
            DateTime dFrom = DateTime.ParseExact(DateFrom, "dd/MM/yyyy", null);
            condition += " AND DICREATEDATE >= '" + dFrom.ToString("yyyy-MM-dd HH:mm:ss") + "'";
        }

        if (!DateTo.Equals(""))
        {
            DateTime dTo = DateTime.ParseExact(DateTo, "dd/MM/yyyy", null).AddDays(1);
            condition += " AND DICREATEDATE < '" + dTo.ToString("yyyy-MM-dd HH:mm:ss") + "'";
        }

        if (!user.Equals(""))
        {
            condition += " AND " + SearchTSql.GetSearchMathedCondition(user, ItemsColumns.ViUrl);
        }

        condition += " AND VISEOMETACANONICAL <> '' ";

        if (order.Length > 0)
        {
            orderBy = order;
        }
        else
        {
            orderBy = CookieExtension.GetCookiesSort(sortCookiesName);
            if (orderBy.Length < 1)
            {
                orderBy = " DCREATEDATE DESC ";
            }
        }

        DataSet ds = new DataSet();
        ds = GroupsItems.GetAllDataPagging(p, DdlListShowItem.SelectedValue, condition, orderBy);
        DataTable dt = new DataTable();
        dt = ds.Tables[1];

        string key        = "modul=" + modul + "&user="******"&title=" + title + "&DateFrom=" + DateFrom + "&DateTo=" + DateTo + "&NumberShowItem=" + NumberShowItem;
        string linkSearch = UrlExtension.WebisteUrl + "/admin.aspx?uc=DuyetTin&suc=BaiVietDaDuyet&" + key;
        LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]),
                                                     Convert.ToInt16(DdlListShowItem.SelectedValue), Convert.ToInt32(p),
                                                     linkSearch, "currentPS", "otherPS", "firstPS",
                                                     "lastPS", "previewPS", "nextPS");
        LtPaggingTop.Text      = LtPagging.Text;
        rp_mn_users.DataSource = ds.Tables[0];
        rp_mn_users.DataBind();
    }
    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(TatThanhJsc.Extension.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;
        }
    }
示例#21
0
    string LoadNicks()
    {
        string s = "";


        string orderby   = GroupsItemsColumns.IorderColumn;
        string condition = DataExtension.AndConditon(
            GroupsTSql.GetGroupsByVglang(lang),
            GroupsTSql.GetGroupsByVgapp(app),
            GroupsTSql.GetGroupsByIgenable("1"),
            ItemsTSql.GetItemsByViapp(app),
            ItemsTSql.GetItemsByIienable("1")
            );
        DataTable dt = new DataTable();

        dt = GroupsItems.GetAllData("", "*", condition, orderby);
        string title = ""; string img = ""; string yahoo = "", viber = "", fb = "", zalo = "", skype = "",

                                                   email = "", phone = "";
        if (dt.Rows.Count == 0)
        {
            return("");
        }
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            img   = ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViimageColumn].ToString(), dt.Rows[i][ItemsColumns.VititleColumn].ToString(), "", true, false, "");
            title = dt.Rows[i][ItemsColumns.VititleColumn].ToString();
            yahoo = dt.Rows[i][ItemsColumns.ViurlColumn].ToString();
            viber = StringExtension.LayChuoi(dt.Rows[i]["VIPARAMS"].ToString(), "", 5);
            fb    = StringExtension.LayChuoi(dt.Rows[i]["VIPARAMS"].ToString(), "", 6);
            zalo  = StringExtension.LayChuoi(dt.Rows[i]["VIPARAMS"].ToString(), "", 4);
            skype = dt.Rows[i][ItemsColumns.ViauthorColumn].ToString();
            email = StringExtension.LayChuoi(dt.Rows[i]["VIPARAMS"].ToString(), "", 3);
            phone = StringExtension.LayChuoi(dt.Rows[i]["VIPARAMS"].ToString(), "", 1);
            s    += @"
            <div class='itemhotro'>
                <a class='title'>" + title + @"</a>
                <div class='hotline'>" + LanguageItemExtension.GetnLanguageItemTitleByName("Hotline") + @": <span>" + phone + @"</span></div>
                <div class='mxh'>
                    <a class='email' href='mailto:" + email + @"'>
                        <img src='Css/pic/email1.png' /></a>
                    <a class='skype' href='skype:call?" + skype + @"'>
                        <img src='Css/pic/skype.png' /></a>
                    <a class='zalo' href='tel:" + zalo + @"'>
                        <img src='Css/pic/zalo.png' /></a>
                </div>
            </div>";
        }
        s = @"
        <div class='hotro' id='popuplh'>
            <a class='close' ></a>
            <div class='noidungtb'>
                <a class='closepopup'></a>
                <div class='nenpopup'>
                     " + LoadTitle() + @"
                    " + s + @"  
                </div>
            </div>
        </div>
        ";
        return(s);
    }
    void GetNew(string order)
    {
        if (!igid.Equals(""))
        {
            ddlCateSearch.SelectedValue = igid;
            condition = GroupsItemsTSql.GetItemsInGroupCondition(ddlCateSearch.SelectedValue, ItemsTSql.GetItemsByViapp(app));
        }
        else
        {
            condition = DataExtension.AndConditon(
                "VGAPP = '" + app + "'",
                GroupsTSql.GetGroupsByVglang(language));
        }

        #region Hiển thị bài đã duyệt theo trạng thái phân quyền
        string userRole = CookieExtension.GetCookies("RolesUser");
        condition += " AND VIURL = '" + userId + "' ";
        if (HorizaMenuConfig.ShowDuyetTin2)
        {
            if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap1, userRole))
            {
                #region Với tài khoản cấp 1 (phóng viên, biên tập viên)
                condition += " AND IIENABLE = '" + PhanQuyen.DuyetTin.Cap1 + "' ";
                #endregion
            }
            else if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap2, userRole))
            {
                #region Với tài khoản cấp 2 (tổng biên tập)
                condition += " AND IIENABLE = '" + PhanQuyen.DuyetTin.Cap2 + "' ";
                #endregion
            }
        }
        else if (HorizaMenuConfig.ShowDuyetTin1)
        {
            if (StringExtension.RoleInListRoles(PhanQuyen.DuyetTin.Cap2, userRole))
            {
                #region Với tài khoản cấp 1 (phóng viên, biên tập viên)
                condition += " AND IIENABLE = '" + PhanQuyen.DuyetTin.Cap2 + "' ";
                #endregion
            }
        }
        #endregion

        if (tbKeySearch.Text.Length > 0)
        {
            condition += " AND " + SearchTSql.GetSearchMathedCondition(tbKeySearch.Text, ItemsColumns.VikeyColumn);
        }
        if (tbTitleSearch.Text.Length > 0)
        {
            condition += " AND " + SearchTSql.GetSearchMathedCondition(tbTitleSearch.Text, ItemsColumns.VititleColumn);
        }

        if (order.Length > 0)
        {
            orderBy = order;
        }
        else
        {
            orderBy = CookieExtension.GetCookiesSort(sortCookiesName);
            if (orderBy.Length < 1)
            {
                orderBy = " DCREATEDATE DESC ";
            }
        }

        DataSet ds = new DataSet();
        ds = GroupsItems.GetAllDataPagging(p, DdlListShowItem.SelectedValue, condition, orderBy);
        DataTable dt = new DataTable();
        dt = ds.Tables[1];

        string key = tbKeySearch.Text + "&name=" + tbTitleSearch.Text;
        LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]),
                                                     Convert.ToInt16(DdlListShowItem.SelectedValue), Convert.ToInt32(p),
                                                     LinkAdmin.UrlAdmin(app, "QuanLyBaiVietChoPheDuyet",
                                                                        ddlCateSearch.SelectedValue, key,
                                                                        NumberShowItem), "currentPS", "otherPS", "firstPS",
                                                     "lastPS", "previewPS", "nextPS");
        LtPaggingTop.Text      = LtPagging.Text;
        rp_mn_users.DataSource = ds.Tables[0];
        rp_mn_users.DataBind();
    }
示例#23
0
    void GetList()
    {
        #region Condition, orderby
        string condition = "";

        if (igid != "")
        {
            condition = GroupsItemsTSql.GetItemsInGroupCondition(igid, "");
        }
        else
        {
            condition = GroupsTSql.GetGroupsByIgid(igidFirst);
        }

        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 ";

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

        DataSet ds = GroupsItems.GetAllDataPagging(p, rows.ToString(), condition, orderby);
        if (ds.Tables.Count > 0)
        {
            DataTable dt      = ds.Tables[0];
            DataTable dtPager = ds.Tables[1];

            #region Lấy ra danh sách bài viết
            if (dt.Rows.Count > 0)
            {
                string link = "";
                string price = "", salePrice = "";
                string time  = "";
                int    point = 2;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    link      = (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower();
                    price     = dt.Rows[i][ItemsColumns.FipriceColumn].ToString();
                    salePrice = dt.Rows[i][ItemsColumns.FisalepriceColumn].ToString();

                    if (price == "0" || price == "")
                    {
                        price     = "";
                        salePrice = LanguageItemExtension.GetnLanguageItemTitleByName("Liên hệ");
                    }
                    else if (salePrice == "0" || salePrice == "")
                    {
                        salePrice = NumberExtension.FormatNumber(price) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                        price     = "";
                    }
                    else
                    {
                        price     = NumberExtension.FormatNumber(price) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                        salePrice = NumberExtension.FormatNumber(salePrice) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                    }

                    time = LayThoiGianTour(dt.Rows[i][ItemsColumns.ViurlColumn].ToString());

                    if (i < point)
                    {
                        ltrList1.Text += @"
          <div class='item item-post item-big'>
            <div class='item-img'>
              <a href='" + link + @"' class='imgc' title='" + dt.Rows[i][ItemsColumns.VititleColumn] + @"'>
                " + ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViimageColumn].ToString(), dt.Rows[i][ItemsColumns.VititleColumn].ToString(), "", true, false, "") + @"
              </a>
              <div class='item-date'>
                <div>
                  <i class='fa fa-calendar' aria-hidden='true'></i><span>" + LanguageItemExtension.GetnLanguageItemTitleByName("Time") + @": " + time + @"</span>
                </div>
                <div>
                  <i class='fa fa-plane' aria-hidden='true'></i><span>" + LanguageItemExtension.GetnLanguageItemTitleByName("Departure") + @": " + dt.Rows[i][ItemsColumns.VISEOMETAPARAMSColumn] + @"</span>
                </div>
              </div>
            </div>
            <div class='item-body'>
              <h3>
                <a href='" + link + @"' class='title item-title' title='" + dt.Rows[i][ItemsColumns.VititleColumn] + @"'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</a>
              </h3>
              <p class='item-text'>" + dt.Rows[i][ItemsColumns.VidescColumn].ToString() + @"</p>
              <div class='item-price'>
                <span class='real'>" + salePrice + @"</span>
                <span class='throught'>" + price + @"</span>
              </div>
              <a href='" + link + @"' class='link item-link' title='" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @"'>" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @" <i class='fa fa-angle-right' aria-hidden='true'></i>
              </a>
            </div>
          </div>";
                    }
                    else
                    {
                        ltrList2.Text += @"
          <div class='col'>
            <div class='item item-post'>
              <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 class='item-date'>
                  <div>
                    <i class='fa fa-calendar' aria-hidden='true'></i><span>" + LanguageItemExtension.GetnLanguageItemTitleByName("Time") + @": " + time + @"</span>
                  </div>
                  <div>
                    <i class='fa fa-plane' aria-hidden='true'></i><span>" + LanguageItemExtension.GetnLanguageItemTitleByName("Departure") + @": " + dt.Rows[i][ItemsColumns.VISEOMETAPARAMSColumn] + @"</span>
                  </div>
                </div>
              </div>
              <div class='item-body'>
                <h3>
                  <a href='" + link + @"' class='title item-title' title='" + dt.Rows[i][ItemsColumns.VititleColumn] + @"'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</a>
                </h3>
                <div class='item-price'>
                  <span class='real'>" + salePrice + @"</span>
                  <span class='throught'>" + price + @"</span>
                </div>
                <a href='" + link + @"' class='link item-link' title='" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @"'>" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @" <i class='fa fa-angle-right' aria-hidden='true'></i>
                </a>
              </div>
            </div>
          </div>";
                    }
                }
            }
            #endregion

            #region Xuất ra phân trang
            if (dtPager.Rows.Count > 0 && dt.Rows.Count > 0)
            {
                string split = PagingExtension.SpilitPages(int.Parse(dtPager.Rows[0]["TotalRows"].ToString()), rows, int.Parse(p), "", "hientai", "trangkhac", "dau", "cuoi", "truoc", "sau");
                if (split.Length > 0)
                {
                    int totalPage = 0;
                    try
                    {
                        double totalrow = double.Parse(dtPager.Rows[0]["TotalRows"].ToString());

                        totalPage = (int)(totalrow / rows);
                        if (totalPage < (totalrow / rows))
                        {
                            totalPage++;
                        }
                    }
                    catch { }

                    ltrPaging.Text +=
                        PagingExtension02.XuLyPhanTrang(split, dtPager.Rows[0]["TotalRows"].ToString(),
                                                        (title != "" ? title : go), LanguageItemExtension.GetnLanguageItemTitleByName("Trang đầu"),
                                                        LanguageItemExtension.GetnLanguageItemTitleByName("Trang cuối"),
                                                        LanguageItemExtension.GetnLanguageItemTitleByName("Trước"),
                                                        LanguageItemExtension.GetnLanguageItemTitleByName("Sau"));
                }
                else
                {
                    if (dt.Rows.Count < 1)
                    {
                        ltrNoResult.Text += "<div class='emptyresult'>" + LanguageItemExtension.GetnLanguageItemTitleByName(noResultText) + "</div>";
                        pnInfo.Visible    = false;
                    }
                }
            }
            else
            {
                ltrNoResult.Text += "<div class='emptyresult'>" + LanguageItemExtension.GetnLanguageItemTitleByName(noResultText) + "</div>";
                pnInfo.Visible    = false;
            }
            #endregion
        }
    }
示例#24
0
    protected string LoadChildMenu(string igParentId, string vgdesc, string rewrite, string layMenuConTheoDanhMuc)
    {
        string top       = "";
        string field     = "*";
        string orderby   = GroupsColumns.IgorderColumn;
        string condition = DataExtension.AndConditon(
            GroupsTSql.GetGroupsByIgenable("1"),
            GroupsTSql.GetGroupsByVglang(lang));

        #region Xét điều kiện lấy các danh mục con nếu menu trỏ đến trang chủ của các modul

        if (layMenuConTheoDanhMuc == "1")
        {
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.News)
            {
                rewrite   = RewriteExtension.News;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.NewsModul.CodeApplications.News),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.Product)
            {
                rewrite   = RewriteExtension.Product;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.ProductModul.CodeApplications.Product),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            //else
            //    if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.Service)
            //{
            //  rewrite = RewriteExtension.Service;
            //  condition = DataExtension.AndConditon(condition,
            //      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.ServiceModul.CodeApplications.Service),
            //      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            //}
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.Video)
            {
                rewrite   = RewriteExtension.Video;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.VideoModul.CodeApplications.Video),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.PhotoAlbum)
            {
                rewrite   = RewriteExtension.PhotoAlbum;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.PhotoAlbumModul.CodeApplications.PhotoAlbum),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.FileLibrary)
            {
                rewrite   = RewriteExtension.FileLibrary;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.FileLibraryModul.CodeApplications.FileLibrary),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.QA)
            {
                rewrite   = RewriteExtension.QA;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.QAModul.CodeApplications.QA),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.Customer)
            {
                rewrite   = RewriteExtension.Customer;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.CustomerModul.CodeApplications.Customer),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.Hotel)
            {
                rewrite   = RewriteExtension.Hotel;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.HotelModul.CodeApplications.Hotel),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            else
            if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.Tour)
            {
                rewrite   = RewriteExtension.Tour;
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByVgapp(TatThanhJsc.TourModul.CodeApplications.Tour),
                                                      GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            }
            //else
            //if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.AboutUs)
            //    {
            //        rewrite = RewriteExtension.AboutUs;
            //        condition = DataExtension.AndConditon(condition,
            //            GroupsTSql.GetGroupsByVgapp(TatThanhJsc.AboutUsModul.CodeApplications.AboutUs),
            //            GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            //    }
            //else
            //if (MenuExtension.GetQueryString(vgdesc, "go") == RewriteExtension.CustomerReviews)
            //    {
            //      rewrite = RewriteExtension.CustomerReviews;
            //      condition = DataExtension.AndConditon(condition,
            //          GroupsTSql.GetGroupsByVgapp(TatThanhJsc.CustomerReviewsModul.CodeApplications.CustomerReviews),
            //          GroupsTSql.GetGroupsByIgparentid(MenuExtension.GetIgidInVgdesc(vgdesc)));
            //    }
            else
            {
                condition = DataExtension.AndConditon(condition,
                                                      GroupsTSql.GetGroupsByIgparentid(igParentId));
            }
        }
        else
        {
            condition = DataExtension.AndConditon(condition,
                                                  GroupsTSql.GetGroupsByIgparentid(igParentId));
        }

        #endregion

        DataTable dt = Groups.GetGroups(top, field, condition, orderby);
        string    s  = "";
        if (dt.Rows.Count > 0)
        {
            string link = "";
            s += @"
      <i class='fa fa-angle-down' aria-hidden='true'></i>
      <div class='sub-menu-1'>
        <ul class='sublist'>";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (rewrite.Length < 1)
                {
                    link = RewriteExtension.GetLinkMenu(dt.Rows[i][GroupsColumns.VgdescColumn].ToString());
                }
                else
                {
                    link = (UrlExtension.WebisteUrl + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn] +
                            RewriteExtension.Extensions).ToLower();
                }

                s += @"
        <li class='sub-item'>
          <a class='subitem-link' href='" + link + "' " + MenuExtension.GetTarget(dt.Rows[i][GroupsColumns.VgparamsColumn].ToString()) + @" title='" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"'>
            <i class='fa fa-angle-right' aria-hidden='true'></i>
            <span>" + dt.Rows[i][GroupsColumns.VgnameColumn] + @"</span>
          </a>
        </li>";
            }
            s += "</ul></div>";
        }
        return(s);
    }
示例#25
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, ItemsColumns.FipriceColumn, ItemsColumns.FisalepriceColumn);

        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 = "";
            string price = "", salePrice = "";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                link      = (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower();
                price     = dt.Rows[i][ItemsColumns.FipriceColumn].ToString();
                salePrice = dt.Rows[i][ItemsColumns.FisalepriceColumn].ToString();

                if (price == "0" || price == "")
                {
                    price     = "";
                    salePrice = LanguageItemExtension.GetnLanguageItemTitleByName("Liên hệ");
                }
                else if (salePrice == "0" || salePrice == "")
                {
                    salePrice = NumberExtension.FormatNumber(price) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                    price     = "";
                }
                else
                {
                    price     = NumberExtension.FormatNumber(price) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                    salePrice = NumberExtension.FormatNumber(salePrice) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                }
                s += @"
        <div class='blog'>
          <div class='item item-post'>
            <div class='item-img'>
              <a href='" + link + @"' title='" + dt.Rows[i][ItemsColumns.VititleColumn] + @"' class='imgc'>
                " + ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViImage].ToString(), dt.Rows[0][ItemsColumns.ViTitle].ToString(), "", true, false, "") + @"
              </a>
            </div>
            <div class='item-body'>
              <h3>
                <a href='" + link + @"' class='title item-title' title='" + dt.Rows[i][ItemsColumns.VititleColumn] + @"'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</a>
              </h3>
              <div class='item-price'>
                <span class='real'>" + salePrice + @"</span>
                <span class='throught'>" + price + @"</span>
              </div>
              <a href='" + link + @"' class='link item-link' title='" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @"'>" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @" <i class='fa fa-angle-right' aria-hidden='true'></i>
              </a>
            </div>
          </div>
        </div>";
            }
        }
        return(s);
    }
    void GetFileLibrary(string order)
    {
        if (!igid.Equals(""))
        {
            ddlCateSearch.SelectedValue = igid;
            condition = GroupsItemsTSql.GetItemsInGroupCondition(ddlCateSearch.SelectedValue, "");
        }
        else
        {
            condition = DataExtension.AndConditon(
                "VGAPP = '" + app + "'",
                GroupsTSql.GetGroupsByVglang(language));
        }
        #region Điều chỉnh bộ lọc với tính năng duyệt tin
        if (FileLibraryConfig.KeyDuyetTin)
        {
            if (HorizaMenuConfig.ShowDuyetTin1 || HorizaMenuConfig.ShowDuyetTin2)
            {
                string userId = CookieExtension.GetCookies("UserId");
                condition += " AND IIENABLE = '0' ";
                condition += " AND VIURL = '" + userId + "' ";
            }
        }
        else
        {
            condition += " AND IIENABLE <> '2' ";
        }
        #endregion

        if (tbKeySearch.Text.Length > 0)
        {
            condition += " AND " + SearchTSql.GetSearchMathedCondition(tbKeySearch.Text, ItemsColumns.VikeyColumn);
        }
        if (tbTitleSearch.Text.Length > 0)
        {
            condition += " AND " + SearchTSql.GetSearchMathedCondition(tbTitleSearch.Text, ItemsColumns.VititleColumn);
        }

        if (order.Length > 0)
        {
            orderBy = order;
        }
        else
        {
            orderBy = CookieExtension.GetCookiesSort(sortCookiesName);
            if (orderBy.Length < 1)
            {
                orderBy = " DCREATEDATE DESC ";
            }
        }

        DataSet ds = new DataSet();
        ds = GroupsItems.GetAllDataPagging(p, DdlListShowItem.SelectedValue, condition, orderBy);
        DataTable dt = new DataTable();
        dt = ds.Tables[1];

        string key = tbKeySearch.Text + "&name=" + tbTitleSearch.Text;
        LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]),
                                                     Convert.ToInt16(DdlListShowItem.SelectedValue), Convert.ToInt32(p),
                                                     LinkAdmin.UrlAdmin(CodeApplications.FileLibrary, TypePage.Item,
                                                                        ddlCateSearch.SelectedValue, key,
                                                                        NumberShowItem), "currentPS", "otherPS", "firstPS",
                                                     "lastPS", "previewPS", "nextPS");
        LtPaggingTop.Text      = LtPagging.Text;
        rp_mn_users.DataSource = ds.Tables[0];
        rp_mn_users.DataBind();
    }
示例#27
0
    void GetList()
    {
        #region Condition, orderby
        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"));

        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 ";

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

        DataTable dt = GroupsItems.GetAllData("", "*", condition, orderby);
        #region Lấy ra danh sách bài viết

        string s  = "";
        string s1 = "";
        string s2 = "";
        if (dt.Rows.Count > 0)
        {
            string link      = "";
            string titleIT   = "";
            string img       = "";
            string detail    = "";
            string dateIT    = "";
            string countView = "";

            string ds_tintucnoibat_right = "";

            s += @"<div class='head_news'>
            <div class='list-news01'>";



            s2 += @"<div class='main-left'>
                <div class='list-news02'>";

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                link      = (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower();
                img       = ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViimageColumn].ToString(), dt.Rows[i][ItemsColumns.VititleColumn].ToString(), "", true, false, "");
                titleIT   = dt.Rows[i][ItemsColumns.VititleColumn].ToString().Replace("'", "");
                detail    = dt.Rows[i][ItemsColumns.ViDesc].ToString();
                dateIT    = ((DateTime)dt.Rows[i][ItemsColumns.DiCreateDate]).ToString(LanguageItemExtension.GetnLanguageItemTitleByName("dd/MM/yyyy"));
                countView = NumberExtension.FormatNumber(((int)dt.Rows[i][ItemsColumns.IitotalviewColumn]).ToString());

                if (i < 6)
                {
                    s += @"
                    <div class='list-news01__item fade-up'>
                        <div class='img'>
                            <a class='img__crop' href='" + link + "' title='" + titleIT + @"'>" + img + @"</a>
                        </div>
                        <h2 class='list-news01__ttl'><a  href='" + link + "' title='" + titleIT + @"'>" + titleIT + @"</a></h2>
                    </div> ";
                }

                if (i > 5)
                {
                    s2 += @"
                    <div class='list-news02__item fade-up " + (i > 8?"hide":"") + @"'>
                        <div class='list-news02__img img'>
                             <a class='img__crop' href='" + link + "' title='" + titleIT + @"'>" + img + @"</a>
                        </div>
                        <div class='list-news02__content'>
                            <h3 class='list-news02__ttl'><a href='" + link + "' title='" + titleIT + @"'>" + titleIT + @" </a></h3>
                            <p class='txtBase'>" + detail + @"</p>
                        </div>
                    </div>";
                }
            }


            s += @"</div></div>";

            s2 += @"</div> <a href='javascript:void(0)' onclick='showmoreNews(this)' class='btn-view fade-up'>Xem thêm tin</a></div>";
        }
        #endregion
        s1 += @" <h2 class='ttl-comp04 fade-up'><span><b>Tin khác</b></span></h2>
        <div class='main-news'>";
        s1 += s2;
        s1 += GetGroups2("");
        s1 += @"</div></div>";

        ltrList.Text = s + s1;
    }
示例#28
0
    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 str        = "";
        string linkUpdate = "";
        string CountChild = "";
        string valueCb    = "";

        if (dt.Rows.Count > 0)
        {
            str      += "<div id=\"CateOrder-" + igparentid + "\" >";
            TxtLevel += "...";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                //linkUpdate = Link.GoAdminCategory(TypeModul.Menu, typePageUpdate, dt.Rows[i]["IGID"].ToString(), igparentid);
                linkUpdate = "?uc=" + uc + "&app=" + app + "&suc=" + TypePage.update + "&igid=" + dt.Rows[i]["IGID"].ToString();

                CountChild = GroupsExtension.CountChildCategory(dt.Rows[i]["IGID"].ToString(), "");
                if (igidParent.Equals(igparentid))
                {
                    valueCb = "";
                }
                else
                {
                    valueCb = igparentid + "_";
                }

                str += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\" >";
                str += "<div class=\"FormatCellItemOther\">";
                str += "<div class=\"pdCellItemOther\">";
                str += "<div class=\"cot1 box-cb\"><input id=\"CbGroup_" + igidParent + "_" + valueCb + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + igidParent + "_" + valueCb + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot2\" align=\"left\">";
                if (!CountChild.Equals("0"))
                {
                    str += "<a id=\"showhide" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:void(0)\" class=\"IcoArrowShow0\" onclick=\"ShowHideGroup('" + dt.Rows[i]["IGID"].ToString() + "');\">&nbsp;</a>";
                }
                str += TxtLevel + "&nbsp;" + dt.Rows[i]["VGNAME"].ToString();
                str += "<div class=\"cbh0\"><!----></div>";
                str += "</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot3\"><a id=\"nc_" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateMenuType('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + GetValueEnable(dt.Rows[i]["VGPARAMS"].ToString()) + "\"><!----></a></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot4\">" + CountChild + "</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot5\"><input id=\"TbOrder" + dt.Rows[i]["IGID"].ToString() + "\" type=\"text\" value=\"" + dt.Rows[i]["IGORDER"].ToString() + "\" class=\"TextInBox box-stt\" onchange=\"UpdateOrderGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + igparentid + "','" + app + "')\" /></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot6\"><a id=\"nc" + dt.Rows[i]["IGID"].ToString() + "\" href=\"javascript:UpdateEnableGroup('" + dt.Rows[i]["IGID"].ToString() + "')\" class=\"EnableIcon" + dt.Rows[i]["IGENABLE"].ToString() + "\">&nbsp;</a></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot7 box-cc\">";
                str += "<a href=\"" + linkUpdate + "&psc=" + GetValueEnable(dt.Rows[i]["VGPARAMS"].ToString()) + "\"><span class='iconEdit'><!----></span></a>";
                str += "&nbsp;&nbsp;&nbsp;";
                str += "<a href=\"javascript:DeleteGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconDelete'><!----></span></a>";
                str += "</div>";
                str += "<div class=\"cbh0\"><!----></div>";
                str += "</div>";
                str += "</div>";

                if (i != dt.Rows.Count - 1)
                {
                    str += "<div class=\"PdSpaceRow\"><div class=\"SpaceRowOther\"><!----></div></div>";
                }
                str += "<div id=\"" + dt.Rows[i]["IGID"].ToString() + "\"  style=\"display:none\">";
                str += GetSubCate(dt.Rows[i]["IGID"].ToString());
                str += "</div>";
                str += "</div>";
            }
            str     += "</div>";
            TxtLevel = "...";
        }
        return(str);
    }
示例#29
0
    void GetList()
    {
        #region Condition, orderby
        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 ";

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

        DataTable dt = GroupsItems.GetAllData("", "*", 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();

                if (i == 0)
                {
                    ltrList.Text += @"
        <div class='itemM fade-up'>
            <div class='itemM__content'>
                <h2 class='itemM__ttl'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</h2>
                <p class='txtBase'>
                  " + dt.Rows[i][ItemsColumns.VicontentColumn] + @"
                </p>
            </div>
            <div class='itemM__img img'>
                <div class='img__crop'>
                    " + ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViimageColumn].ToString(), dt.Rows[i][ItemsColumns.VititleColumn].ToString(), "", true, false, "", false) + @"
                </div>
            </div>
        </div>";
                }
                else if (i == 1)
                {
                    ltrList.Text += @"
  <h2 class='ttl-comp03 ttl-comp03--md fade-up active'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</h2>
    <div class='box-tab'>
            <div class='img-left'>
                <img src='/img/seminor/img-left.jpg' alt=''>
            </div>
            " + GetOtherImages(dt.Rows[i][ItemsColumns.IidColumn].ToString()) + @"
            <div class='img-right'>
                <img src='/img/seminor/img-right.jpg' alt=''>
            </div>
    </div>
";
                }
                else
                {
                    ltrList.Text += @"
 <div class='picture-restaurant'>
    <h2 class='ttl-comp03 ttl-comp03--md fade-up active'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</h2>
    <div class='list-picture'>
        " + GetOtherImages2(dt.Rows[i][ItemsColumns.IidColumn].ToString()) + @"
    </div>
</div>";
                }
            }
        }
    }
示例#30
0
    void GetList()
    {
        #region Condition, orderby
        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 ";

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

        DataSet ds = GroupsItems.GetAllDataPagging(p, rows.ToString(), condition, orderby);
        if (ds.Tables.Count > 0)
        {
            DataTable dt      = ds.Tables[0];
            DataTable dtPager = ds.Tables[1];

            #region Lấy ra danh sách bài viết
            if (dt.Rows.Count > 0)
            {
                string link = "";
                string bigPost = "", smallPost = "";
                string price = "", salePrice = "";
                int    point = 2;

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    link      = (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower();
                    price     = dt.Rows[i][ItemsColumns.FipriceColumn].ToString();
                    salePrice = dt.Rows[i][ItemsColumns.FisalepriceColumn].ToString();

                    if (price == "0" || price == "")
                    {
                        price     = "";
                        salePrice = LanguageItemExtension.GetnLanguageItemTitleByName("Liên hệ");
                    }
                    else if (salePrice == "0" || salePrice == "")
                    {
                        salePrice = NumberExtension.FormatNumber(price) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                        price     = "";
                    }
                    else
                    {
                        price     = NumberExtension.FormatNumber(price) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                        salePrice = NumberExtension.FormatNumber(salePrice) + LanguageItemExtension.GetnLanguageItemTitleByName("VNĐ");
                    }

                    if (i < point)
                    {
                        bigPost += @"
            <div class='blog'>
              <div class='item item-row'>
                <div class='item-img'>
                  <a href='" + link + @"' 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'>
                  <h3>
                    <a href='" + link + @"' class='title item-title fSize-20'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</a>
                  </h3>
                  <div class='item-text'>
                    " + StringExtension.LayChuoi(dt.Rows[i][ItemsColumns.VicontentColumn].ToString(), "", 1) + @"
                  </div>
                  <div class='item-price'>
                    <span class='real'>" + salePrice + @"</span>
                    <span class='throught'>" + price + @"</span>
                  </div>
                  <a href='" + link + @"' class='link item-link' title='" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @"'>" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @" <i class='fa fa-angle-right' aria-hidden='true'></i>
                  </a>
                </div>
              </div>
            </div>";
                    }
                    else
                    {
                        smallPost += @"
            <div class='col-12 col-sm-12 col-md-6 col-lg-6 col-xl-3'>
              <div class='item item-post'>
                <div class='item-img'>
                  <a href='" + link + @"' 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'>
                  <h3>
                    <a href='" + link + @"' class='title item-title'>" + dt.Rows[i][ItemsColumns.VititleColumn] + @"</a>
                  </h3>
                  <div class='item-price'>
                    <span class='real'>" + salePrice + @"</span>
                    <span class='throught'>" + price + @"</span>
                  </div>
                  <a href='" + link + @"' class='link item-link' title='" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @"'>" + LanguageItemExtension.GetnLanguageItemTitleByName("More") + @" <i class='fa fa-angle-right' aria-hidden='true'></i>
                  </a>
                </div>
              </div>
            </div>";
                    }

                    ltrList.Text = @"
           <div class='sublist sublist-1'>
            <div class='sublist-body'>
              <div class='slick-slider' data-slick='{'slidesToShow': 1, 'slidesToScroll': 1, 'autoplay': true, 'dots': false, 'arrows':true}'>
                " + bigPost + @"
              </div>
            </div>
          </div>
          <div class='sublist sublist-2'>
            <div class='sublist-body'>
              <div class='row'>
                " + smallPost + @"
              </div>
            </div>
          </div>";
                }
            }
            #endregion

            #region Xuất ra phân trang
            if (dtPager.Rows.Count > 0 && dt.Rows.Count > 0)
            {
                string split = PagingExtension.SpilitPages(int.Parse(dtPager.Rows[0]["TotalRows"].ToString()), rows, int.Parse(p), "", "hientai", "trangkhac", "dau", "cuoi", "truoc", "sau");
                if (split.Length > 0)
                {
                    int totalPage = 0;
                    try
                    {
                        double totalrow = double.Parse(dtPager.Rows[0]["TotalRows"].ToString());

                        totalPage = (int)(totalrow / rows);
                        if (totalPage < (totalrow / rows))
                        {
                            totalPage++;
                        }
                    }
                    catch { }

                    ltrPaging.Text +=
                        PagingExtension02.XuLyPhanTrang(split, dtPager.Rows[0]["TotalRows"].ToString(),
                                                        (title != "" ? title : go), LanguageItemExtension.GetnLanguageItemTitleByName("Đầu"),
                                                        LanguageItemExtension.GetnLanguageItemTitleByName("Cuối"),
                                                        LanguageItemExtension.GetnLanguageItemTitleByName("Trước"),
                                                        LanguageItemExtension.GetnLanguageItemTitleByName("Sau"));
                }
                else
                {
                    if (dt.Rows.Count < 1)
                    {
                        ltrList.Text += "<div class='emptyresult'>" + LanguageItemExtension.GetnLanguageItemTitleByName(noResultText) + "</div>";
                    }
                }
            }
            else
            {
                ltrList.Text += "<div class='emptyresult'>" + LanguageItemExtension.GetnLanguageItemTitleByName(noResultText) + "</div>";
            }
            #endregion
        }
    }