Beispiel #1
0
    void GetAllModul()
    {
        DataTable dt = new DataTable();

        fields    = " * ";
        condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVgapp(app),
                                              GroupsTSql.GetGroupsByVglang(language),
                                              " IGENABLE = '2' ");
        orderBy = "";
        dt      = Groups.GetAllGroups(fields, condition, orderBy);

        string str = "";

        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                str += "<div id=\"Cate-" + dt.Rows[i]["IGID"].ToString() + "\">";
                str += "<div class=\"FormatCellItem\">";
                str += "<div class=\"pdCellItem\">";
                str += "<div class=\"cot1 box-cb\"><input id=\"CbGroup_" + dt.Rows[i]["IGID"].ToString() + "\" type=\"checkbox\" onclick=\"CheckAllCheckBox('CbGroup_" + dt.Rows[i]["IGID"].ToString() + "',this)\" /></div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot2\" align=\"left\">";
                str += dt.Rows[i]["VGNAME"].ToString();
                str += "<div class=\"cbh0\"><!----></div>";
                str += "</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot4\" align=\"left\">" + GetRoadGroup(dt.Rows[i]["IGPARENTID"].ToString(), dt.Rows[i]["VGNAME"].ToString()) + "&nbsp;</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot5\">" + dt.Rows[i]["IGORDER"].ToString() + "</div>";
                str += "<div class=\"splitc\">|</div>";
                str += "<div class=\"cot7 box-cc\">";
                str += "<a href=\"javascript:RestoreGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + StatusGroupParent(dt.Rows[i]["IGPARENTID"].ToString()) + "','" + GetSubCate(dt.Rows[i]["IGID"].ToString()) + "','" + dt.Rows[i]["VGNAME"].ToString() + "')\"><span class='iconRestore'><!----></span></a>";
                str += "&nbsp;&nbsp;&nbsp;";
                str += "<a href=\"javascript:DeleteRecGroup('" + dt.Rows[i]["IGID"].ToString() + "','" + GetSubCate(dt.Rows[i]["IGID"].ToString()) + "','" + dt.Rows[i]["VGNAME"].ToString() + "','" + pic + "')\"><span class='iconDelete'><!----></span></a>";
                str += "</div>";
                str += "<div class=\"cbh0\"><!----></div>";
                str += "</div>";
                str += "</div>";
                //igidParent = dt.Rows[i]["IGID"].ToString();
                if (i != dt.Rows.Count - 1)
                {
                    str += "<div class=\"PdSpaceRow\"><div class=\"SpaceRow\"><!----></div></div>";
                }
                str += "</div>";
            }
        }
        LtListMenus.Text = str;
    }
Beispiel #2
0
    private string GetList(string igid, string maxRow)
    {
        string condition = DataExtension.AndConditon(
            ItemsTSql.GetItemsByIienable("1"),
            ItemsTSql.GetItemsByViapp(app),
            ItemsTSql.GetItemsByVilang(lang),
            GroupsItemsTSql.GetItemsInGroupCondition(igid, "")
            );

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

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

        return(BindItemsToHTML(dt));
    }
Beispiel #3
0
    string  loadDataDetail(string iid)
    {
        string s = "";

        condition = DataExtension.AndConditon(
            ItemsTSql.GetItemsByIid(iid)
            );
        DataTable dt = TatThanhJsc.Database.Items.GetItems("", " * ", condition, "");

        if (dt.Rows.Count > 0)
        {
            s = dt.Rows[0]["VITITLE"].ToString();
        }
        return(s);
    }
Beispiel #4
0
    string GetInsertedId(string app, string title, string createDate)
    {
        string condition = DataExtension.AndConditon(
            ItemsTSql.GetByApp(app),
            ItemsTSql.GetByTitle(title),
            ItemsTSql.GetByCreateDate(createDate)
            );
        DataTable dt = Items.GetItems("1", ItemsColumns.IidColumn, condition, ItemsColumns.IidColumn + " desc");

        if (dt.Rows.Count > 0)
        {
            return(dt.Rows[0][ItemsColumns.IidColumn].ToString());
        }
        return("");
    }
Beispiel #5
0
    void GetVotes()
    {
        top    = "";
        fields = " * ";

        condition = DataExtension.AndConditon("VGAPP = '" + app + "'", GroupsTSql.GetGroupsByVglang(language));
        orderBy   = " DCREATEDATE DESC ";

        DataTable dt = new DataTable();

        dt = GroupsItems.GetAllData(top, fields, condition, orderBy);

        rp_mn_users.DataSource = dt;
        rp_mn_users.DataBind();
    }
Beispiel #6
0
    void GetListReply()
    {
        condition = DataExtension.AndConditon
                    (
            SubitemsTSql.GetSubitemsByIid(iid),
            SubitemsTSql.GetSubitemsByVsurl(isid),//lấy trả lời
            SubitemsTSql.GetSubitemsByVskey(app)
                    );
        orderby = SubitemsColumns.DscreatedateColumn + " desc ";
        DataTable dt = new DataTable();

        dt = Subitems.GetSubItems("", "*", condition, orderby);
        rptList.DataSource = dt;
        rptList.DataBind();
    }
    void GetGroupsProductInDdl()
    {
        DataTable dt = new DataTable();

        condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(CodeApplications.Tour), " igenable <> '2' ");
        dt        = Groups.GetAllGroups("*", condition, "");
        DdlGroupProduct.Items.Clear();
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DdlGroupProduct.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i][GroupsColumns.IgidColumn].ToString()));
            }
        }
    }
    private static string GetCateOfBlog(string iid)
    {
        string condition = DataExtension.AndConditon(
            GroupsTSql.GetByApp(TatThanhJsc.BlogModul.CodeApplications.Blog),
            ItemsTSql.GetById(iid)
            );
        DataTable dt = GroupsItems.GetAllData("1", "*", condition, "");

        if (dt.Rows.Count > 0)
        {
            return("<a href='" + (UrlExtension.WebisteUrl + dt.Rows[0][GroupsColumns.VGSEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower() + @"' title='" + dt.Rows[0][GroupsColumns.VgnameColumn] + @"'>" + dt.Rows[0][GroupsColumns.VgnameColumn] + @"</a>");
        }

        return("");
    }
 void GetItems()
 {
     top = "10";
     fields = "*";
     condition = DataExtension.AndConditon(
         GroupsTSql.GetGroupsByVgapp(app) + " AND IGENABLE <> '2' AND IIENABLE <> '2' ",
         ItemsTSql.GetItemsByVilang(language));
     orderBy = ItemsColumns.IitotalviewColumn + " desc";
     DataTable dt = new DataTable();
     dt = GroupsItems.GetAllData(top, fields, condition, orderBy);
     if (dt.Rows.Count > 0)
     {
         RpItems.DataSource = dt;
         RpItems.DataBind();
     }
 }
Beispiel #10
0
    private string LayEmailPhongBan(string igid)
    {
        string s         = "";
        string condition = DataExtension.AndConditon(
            GroupsTSql.GetGroupsByIgid(igid),
            GroupsTSql.GetGroupsByVgapp(app)
            );
        DataTable dt = new DataTable();

        dt = Groups.GetGroups("1", GroupsColumns.VgcontentColumn, condition, "");
        if (dt.Rows.Count > 0)
        {
            s = StringExtension.LayChuoi(dt.Rows[0][GroupsColumns.VgcontentColumn].ToString(), "", 4);
        }
        return(s);
    }
Beispiel #11
0
    /// <summary>
    /// Lấy danh sách các thuộc tính đã được add cho danh mục
    /// </summary>
    void GetFilterProperties()
    {
        if (DealConfig.KeyHienThiThuocTinhLocDeal)
        {
            condition = DataExtension.AndConditon(
                GroupsTSql.GetGroupsByVglang(language),
                GroupsTSql.GetGroupsByVgapp(appFilter),
                GroupsTSql.GetGroupsByIgenable("1"),
                "charindex('" + parramSpitString + "'+cast(" + GroupsColumns.IgidColumn + " as varchar(10))+'" + parramSpitString + "','" + GetListFilterProperties() + "') >0");
            DataTable dt = new DataTable();
            dt = Groups.GetGroups("", "*", condition, "");

            rptParentFilter.DataSource = dt;
            rptParentFilter.DataBind();
        }
    }
    /// <summary>
    /// Lấy danh sách các thuộc tính đã được add
    /// </summary>
    void GetListAdded()
    {
        lstbAdded.Items.Clear();
        condition = DataExtension.AndConditon(
            TatThanhJsc.TSql.GroupsTSql.GetGroupsByVglang(language),
            TatThanhJsc.TSql.GroupsTSql.GetGroupsByVgapp(app),
            GroupsColumns.IgenableColumn + "<>2",
            "charindex('" + parramSplitString + "'+cast(" + TatThanhJsc.Columns.GroupsColumns.IgidColumn + " as varchar(10))+'" + parramSplitString + "','" + GetListFilterProperties() + "') >0");
        DataTable dt = new DataTable();

        dt = TatThanhJsc.Database.Groups.GetAllGroups("*", condition, "");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            lstbAdded.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i]["IGID"].ToString()));
        }
    }
Beispiel #13
0
    private void GetGroupsInfoByItemId(string iid, string viapp)
    {
        string condition = DataExtension.AndConditon(
            GroupsTSql.GetGroupsByIgenable("1"),
            GroupsTSql.GetGroupsByVgapp(viapp),
            GroupsTSql.GetGroupsByVglang(lang),
            ItemsTSql.GetItemsByIid(iid)
            );
        DataTable dt = GroupsItems.GetAllData("1", "groups.*", condition, "");

        if (dt.Rows.Count > 0)
        {
            Session["dataByTitle_Cate"] = dt;
            Session["igid"]             = dt.Rows[0][GroupsColumns.IgidColumn].ToString();
        }
    }
Beispiel #14
0
 void GetGroupsInDdl()
 {
     DataTable dt = new DataTable();
     condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(app), " igenable <> '2' ");
     dt = Groups.GetAllGroups("*", condition, "");
     DdlGroupService.Items.Clear();
     DdlGroupService.Items.Add(new ListItem("Danh mục gốc", "0"));
     if (dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             DdlGroupService.Items.Add(new ListItem(TatThanhJsc.Extension.DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i]["IGID"].ToString()));
         }
     }
     DdlGroupService.SelectedValue = hd_parent;
 }
    void GetCategories(string order)
    {
        DdlListShowItem.SelectedValue = NumberShowItem;

        fields = "*";

        condition = DataExtension.AndConditon(
            MembersTSql.GetMembersByVproperty(app),
            MembersColumns.ImemberisapprovedColumn + "<>2");
        if (txtKeySearch.Text.Length > 0 && !txtKeySearch.Text.Equals("Nhập địa chỉ email cần tìm"))
        {
            condition = DataExtension.AndConditon(condition, TatThanhJsc.TSql.SearchTSql.GetSearchMathedCondition(txtKeySearch.Text, MembersColumns.VmemberaccountColumn, MembersColumns.VmembernameColumn));
        }

        #region OrderBy
        if (order.Length > 0)
        {
            orderBy = order;
        }
        else
        {
            orderBy = CookieExtension.GetCookiesSort(sortCookiesName);
            if (orderBy.Length < 1)
            {
                orderBy = MembersColumns.VmemberaccountColumn;
            }
        }
        #endregion

        DataTable dt = new DataTable();

        DataSet ds = Members.GetMembersPaggingCondition(p, NumberShowItem, condition, orderBy);

        dt = ds.Tables[1];


        LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]),
                                                     Convert.ToInt16(DdlListShowItem.SelectedValue), Convert.ToInt32(p),
                                                     LinkAdmin.UrlAdmin("", TypePage.Item,
                                                                        "", key,
                                                                        NumberShowItem), "currentPS", "otherPS", "firstPS",
                                                     "lastPS", "previewPS", "nextPS");

        dt = ds.Tables[0];
        rp_mn_users.DataSource = dt;
        rp_mn_users.DataBind();
    }
    public void DeleteSubItem(string isid, string pic)
    {
        DataTable dtItem = new DataTable();

        dtItem = Subitems.GetSubItems("", "*", SubitemsTSql.GetSubitemsByIsid(isid), "");
        if (dtItem.Rows.Count > 0)
        {
            string split = TatThanhJsc.AdminModul.Keyword.ParamsSpilitItems;
            #region Xoá trả lời của comment
            DataTable dt = new DataTable();
            dt = Subitems.GetSubItems("", "*", DataExtension.AndConditon(SubitemsTSql.GetSubitemsByVskey(dtItem.Rows[0][SubitemsColumns.VskeyColumn].ToString() + "Reply"), SubitemsTSql.GetSubitemsByVsurl(isid)), "");
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                #region Xóa ảnh
                if (dt.Rows[i][SubitemsColumns.VsimageColumn].ToString().IndexOf(split) < 0)
                {
                    ImagesExtension.DeleteImageWhenDeleteItem(pic, dt.Rows[i][SubitemsColumns.VsimageColumn].ToString());
                }
                else
                {
                    foreach (string s in dt.Rows[i][SubitemsColumns.VsimageColumn].ToString().Split(new string[] { split }, StringSplitOptions.RemoveEmptyEntries))
                    {
                        ImagesExtension.DeleteImageWhenDeleteItem(pic, s);
                    }
                }
                #endregion

                Subitems.DeleteSubitems(dt.Rows[i][SubitemsColumns.IsidColumn].ToString());
            }
            #endregion

            #region Xóa ảnh
            if (dtItem.Rows[0][SubitemsColumns.VsimageColumn].ToString().IndexOf(split) < 0)
            {
                ImagesExtension.DeleteImageWhenDeleteItem(pic, dtItem.Rows[0][SubitemsColumns.VsimageColumn].ToString());
            }
            else
            {
                foreach (string s in dtItem.Rows[0][SubitemsColumns.VsimageColumn].ToString().Split(new string[] { split }, StringSplitOptions.RemoveEmptyEntries))
                {
                    ImagesExtension.DeleteImageWhenDeleteItem(pic, s);
                }
            }
            #endregion
            Subitems.DeleteSubitems(isid);
        }
    }
    void GetQA(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));
        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.QA, 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();
    }
    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;
        }
    }
    private string GetList(string id, string top)
    {
        var    s = string.Empty;
        string fields = "*", condition = "", orderby = "";
        int    rows = 6;

        try
        {
            rows = int.Parse(top);
        }
        catch
        {
        }
        condition = DataExtension.AndConditon(
            ItemsTSql.GetByEnable("1"),
            ItemsTSql.GetByApp(app)
            );
        condition = GroupsItemsTSql.GetItemsInGroupCondition(id, condition);
        orderby   = GroupsItemsColumns.IorderColumn;
        DataTable dt = GroupsItems.GetAllData(rows.ToString(), fields, condition, orderby);

        if (dt.Rows.Count > 0)
        {
            s = "";
            string link = "", titleItem = "", desc = "", img = "", dateIT = "", countView = "", listOrther = "";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                link      = (UrlExtension.WebisteUrl + dt.Rows[i][ItemsColumns.VISEOLINKSEARCHColumn] + RewriteExtension.Extensions).ToLower();
                titleItem = dt.Rows[i][ItemsColumns.VititleColumn].ToString();
                img       = ImagesExtension.GetImage(pic, dt.Rows[i][ItemsColumns.ViimageColumn].ToString(), titleItem, "", true, false, "", false);
                desc      = dt.Rows[i][ItemsColumns.VidescColumn].ToString();
                dateIT    = ((DateTime)dt.Rows[i][ItemsColumns.DicreatedateColumn]).ToString("dd/MM/yyyy");
                countView = NumberExtension.FormatNumber((int.Parse(dt.Rows[i][ItemsColumns.IitotalviewColumn].ToString())).ToString());
                s        += @"
        <div class='list-news03__item fade-up'>
            <div class='list-news03__img img'>
                <a class='img__crop' href='" + link + "' title='" + titleItem + @"'> " + img + @"</a>
            </div>
            <div class='list-news03__content'>
                <h3 class='list-news03__ttl'><a href='" + link + "' title='" + titleItem + @"'>" + titleItem + @"</a></h3>
            </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 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);
    }
    void GetGroupsProductInDdl()
    {
        DataTable dt = new DataTable();

        condition = DataExtension.AndConditon(GroupsTSql.GetGroupsByVglang(language), GroupsTSql.GetGroupsByVgapp(CodeApplications.Product), " igenable <> '2' ");
        dt        = Groups.GetAllGroups("*", condition, "");
        DdlGroupProduct.Items.Clear();
        DdlGroupProduct.Items.Add(new ListItem("Danh mục gốc", "0"));
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string link = "/" + dt.Rows[i][GroupsColumns.VGSEOLINKSEARCHColumn].ToString().ToLower() + RewriteExtension.Extensions;
                DdlGroupProduct.Items.Add(new ListItem(DropDownListExtension.FormatForDdl(dt.Rows[i]["IGLEVEL"].ToString()) + dt.Rows[i]["VGNAME"].ToString(), dt.Rows[i][GroupsColumns.IgidColumn].ToString()));
            }
        }
    }
Beispiel #22
0
    private string GetFirtIGID()
    {
        string s         = "";
        string condition = DataExtension.AndConditon(
            GroupsTSql.GetByApp(CodeApplications.Contact),
            GroupsTSql.GetByEnable("1"),
            GroupsTSql.GetByLevel("1"),
            GroupsTSql.GetByLang(lang)
            );
        DataTable dt = Groups.GetGroups("1", GroupsColumns.IgidColumn, condition, GroupsColumns.IgorderColumn);

        if (dt.Rows.Count > 0)
        {
            s = dt.Rows[0][GroupsColumns.IgidColumn].ToString();
        }
        return(s);
    }
Beispiel #23
0
    void LoadInfo()
    {
        top       = "1";
        fields    = LanguageItemColumns.nLanguageItemParams;
        condition = DataExtension.AndConditon(LanguageItemTSql.GetByiLanguageKeyId(iLanguageKeyId),
                                              LanguageItemTSql.GetByiLanguageNationalId(language));
        order = "";
        DataTable dt = new DataTable();

        dt = LanguageItem.GetLanguageItem(top, fields, condition, order);
        if (dt.Rows.Count > 0)
        {
            hdOldImage.Value = dt.Rows[0][LanguageItemColumns.nLanguageItemParams].ToString();
            hdUpdate.Value   = "1";
            ltrImage.Text    = ImagesExtension.GetImage(folderpic, hdOldImage.Value, "", "", false, false, "");
        }
    }
    bool ExistedEmail(string email, string app)
    {
        condition = DataExtension.AndConditon(
            MembersTSql.GetMembersByVmemberemail(email),
            MembersTSql.GetMembersByVproperty(app));
        DataTable dt = new DataTable();

        dt = Members.GetMembersCondition("", MembersColumns.ImidColumn, condition, "");
        if (dt.Rows.Count > 0)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
    void GetListMes()
    {
        top       = "";
        fields    = " * ";
        condition = DataExtension.AndConditon(SubitemsTSql.GetSubitemsByVskey(CodeApplications.MemberNoticeBQT),
                                              SubitemsTSql.GetSubitemsByVsatuthor(imid)
                                              );
        order = " DSCREATEDATE DESC ";
        DataTable dt = new DataTable();

        dt = Subitems.GetSubItems(top, fields, condition, order);
        if (dt.Rows.Count > 0)
        {
            RpListNoticeBQT.DataSource = dt;
            RpListNoticeBQT.DataBind();
        }
    }
Beispiel #26
0
    /// <summary>
    /// Lấy danh sách các thuộc tính lọc con
    /// </summary>
    /// <param name="igid">igid của thuộc tính cha</param>
    /// <param name="vgparrams">parram của thuộc tính cha (lưu thiết lập cho chọn 1 hoặc nhiều thuộc tính con)</param>
    /// <param name="allowMultipSelect">0: chỉ lấy ra thuộc tính con nếu thuộc tính cha thiết lập chỉ cho chọn 1 thuộc tính con/1 sp</param>
    /// <returns></returns>
    protected DataTable GetSubFilter(string igid, string vgparrams, string allowMultipSelect)
    {
        DataTable dtSubs = new DataTable();

        if (vgparrams == allowMultipSelect)
        {
            fields    = GroupsColumns.IgidColumn + "," + GroupsColumns.VgnameColumn;
            condition = DataExtension.AndConditon
                        (
                GroupsTSql.GetGroupsByVgapp(appFilter),
                GroupsTSql.GetGroupsByIgparentid(igid),
                GroupsTSql.GetGroupsByIgenable("1")
                        );
            dtSubs = Groups.GetGroups("", fields, condition, "");
        }
        return(dtSubs);
    }
Beispiel #27
0
    void LoadContactDetailContent(string iid)
    {
        top       = "";
        fields    = "*";
        condition = DataExtension.AndConditon(ItemsTSql.GetItemsByIid(iid),
                                              ItemsTSql.GetByApp("QLDDKTV"));
        orderby = "";
        DataTable dt = TatThanhJsc.Database.GroupsItems.GetAllData(top, fields, condition, orderby);

        if (dt.Rows.Count > 0)
        {
            ltrHoten.Text   = dt.Rows[0][ItemsColumns.ViauthorColumn].ToString();
            ltrEmail.Text   = StringExtension.LayChuoi(dt.Rows[0][ItemsColumns.ViparamsColumn].ToString(), "", 1);
            ltrNoiDung.Text = dt.Rows[0][ItemsColumns.VicontentColumn].ToString();
            ltrGuiLuc.Text  = ((DateTime)dt.Rows[0][ItemsColumns.DicreatedateColumn]).ToString("dd/MM/yyyy hh:mm:ss tt");
        }
    }
Beispiel #28
0
    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' ";
        conditionItem += " AND IGENABLE <> '2' AND (IIENABLE = '1' OR IIENABLE = '0') ";

        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()));
        }
    }
Beispiel #29
0
    private void InitialControlsValue()
    {
        //Trường hợp sửa lịch trình
        if (isid != "")
        {
            string condition = DataExtension.AndConditon(SubitemsTSql.GetSubitemsByVskey(app),
                                                         SubitemsTSql.GetSubitemsByIsid(isid));

            DataTable dt = Subitems.GetSubItems("1", "*", condition, "");
            if (dt.Rows.Count > 0)
            {
                tbNgay.Text        = StringExtension.LayChuoi(dt.Rows[0][SubitemsColumns.VstitleColumn].ToString(), "", 1);
                tbTenHoatDong.Text = StringExtension.LayChuoi(dt.Rows[0][SubitemsColumns.VstitleColumn].ToString(), "", 2);
                flAnhDaiDien.Load(dt.Rows[0][SubitemsColumns.VsimageColumn].ToString());

                #region Các điểm đến sẽ qua
                if (dt.Rows[0][SubitemsColumns.VsurlColumn].ToString().StartsWith("text-"))
                {
                    tbCacDiemDenSeQua.Text = dt.Rows[0][SubitemsColumns.VsurlColumn].ToString().Substring("text-".Length);
                }
                if (dt.Rows[0][SubitemsColumns.VsurlColumn].ToString().StartsWith("id-"))
                {
                    hdIdCacDiemDenSeQua.Value = "," + dt.Rows[0][SubitemsColumns.VsurlColumn].ToString().Substring("id-".Length) + ",";
                }
                #endregion

                #region Bữa ăn
                string listId = "," + dt.Rows[0][SubitemsColumns.VsemailColumn].ToString() + ",";
                for (int i = 0; i < cblBuaAn.Items.Count; i++)
                {
                    if (listId.IndexOf("," + cblBuaAn.Items[i].Value + ",") > -1)
                    {
                        cblBuaAn.Items[i].Selected = true;
                    }
                }
                #endregion

                tbThuTu.Text        = dt.Rows[0][SubitemsColumns.VsatuthorColumn].ToString();
                cbTrangThai.Checked = (dt.Rows[0][SubitemsColumns.IsenableColumn].ToString() == "1");

                tbHoatDongChiTiet.Text  = dt.Rows[0][SubitemsColumns.VscontentColumn].ToString();
                hdHoatDongChiTiet.Value = dt.Rows[0][SubitemsColumns.VscontentColumn].ToString();
            }
        }
    }
    /// <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);
    }