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();
    }
Ejemplo n.º 2
0
    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);
        }
    }
    string GetListEmail()
    {
        string s = "";

        #region Lấy khách hàng tiềm năng

        condition = DataExtension.AndConditon(
            MembersTSql.GetMembersByVproperty(TatThanhJsc.MemberModul.CodeApplications.MemberNewsletter),
            MembersTSql.GetMembersByImemberisapproved("1"),
            MembersTSql.GetMembersByVmemberidentitycard("1"));
        fields = MembersColumns.VmemberemailColumn;
        DataTable dt = new DataTable();
        dt = Members.GetMembersCondition("", fields, condition, "");
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            s += dt.Rows[i][MembersColumns.VmemberemailColumn] + parramSplitString;
        }

        #endregion
        return(s);
    }