Пример #1
0
    private void GridBind()
    {
        MojoCube.Api.UI.AdminPager pager = new MojoCube.Api.UI.AdminPager(ListPager);
        pager.PageSize     = MojoCube.Web.String.PageSize();
        pager.ConnStr      = MojoCube.Web.Connection.ConnString();
        pager.TableName    = "View_Member_Message";
        pager.strGetFields = "*";

        string where = "IsDeleted=0";

        if (txtKeyword.Text.Trim() != "")
        {
            string keyword = MojoCube.Api.Text.CheckSql.Filter(txtKeyword.Text.Trim());
            where += " and (Title like '%" + keyword + "%' or Contents like '%" + keyword + "%')";
        }

        if (Session["MessageTypeID"] != null)
        {
            where += " and TypeID=" + Session["MessageTypeID"].ToString();
        }

        pager.where     = where;
        pager.fldName   = ViewState["OrderByKey"].ToString();
        pager.OrderType = (bool)ViewState["OrderByType"];

        GridView1.DataSource = pager.GetTable();
        GridView1.DataBind();
    }
Пример #2
0
    private void GridBind()
    {
        MojoCube.Api.UI.AdminPager pager = new MojoCube.Api.UI.AdminPager(ListPager);
        pager.PageSize     = 12;
        pager.ConnStr      = MojoCube.Web.Connection.ConnString();
        pager.TableName    = "Image_List";
        pager.strGetFields = "*";

        string where = "FileSize>0";

        if (ViewState["CategoryID"] != null && ViewState["CategoryID"].ToString() != "0")
        {
            where += " and fk_Category=" + ViewState["CategoryID"].ToString();
        }

        if (txtKeyword.Text.Trim() != "")
        {
            string keyword = MojoCube.Api.Text.CheckSql.Filter(txtKeyword.Text.Trim());
            where += " and (Title like '%" + keyword + "%')";
        }
        pager.where     = where;
        pager.fldName   = ViewState["OrderByKey"].ToString();
        pager.OrderType = (bool)ViewState["OrderByType"];

        ImageDiv.InnerHtml = CreateImage(pager.GetTable());
    }
Пример #3
0
    private void GridBind()
    {
        EmptyDiv.Visible = false;

        MojoCube.Api.UI.AdminPager pager = new MojoCube.Api.UI.AdminPager(ListPager);
        pager.PageSize     = MojoCube.Web.String.PageSize();
        pager.ConnStr      = MojoCube.Web.Connection.ConnString();
        pager.TableName    = "Article_List";
        pager.strGetFields = "*";

        string where = "Language='" + MojoCube.Api.UI.Language.GetLanguage() + "'";

        if (txtKeyword.Text.Trim() != "")
        {
            string keyword = MojoCube.Api.Text.CheckSql.Filter(txtKeyword.Text.Trim());
            where += " and (Title like '%" + keyword + "%')";
        }

        if (ViewState["ParentID"].ToString() != "0")
        {
            where += " and (CategoryID1=" + ViewState["ParentID"].ToString() + " or CategoryID2=" + ViewState["ParentID"].ToString() + ")";
        }

        pager.where     = where;
        pager.fldName   = ViewState["OrderByKey"].ToString();
        pager.OrderType = (bool)ViewState["OrderByType"];

        GridView1.DataSource = pager.GetTable();
        GridView1.DataBind();

        if (GridView1.Rows.Count == 0)
        {
            EmptyDiv.Visible = true;
        }
    }
Пример #4
0
    private void GridBind()
    {
        MojoCube.Api.UI.AdminPager pager = new MojoCube.Api.UI.AdminPager(ListPager);
        pager.PageSize     = MojoCube.Web.String.PageSize();
        pager.ConnStr      = MojoCube.Web.Connection.ConnString();
        pager.TableName    = "View_SMS_Log";
        pager.strGetFields = "*";
        if (txtKeyword.Text.Trim() != "")
        {
            string keyword = MojoCube.Api.Text.CheckSql.Filter(txtKeyword.Text.Trim());
            pager.where = "FullName like '%" + keyword + "%'";
        }
        pager.fldName   = ViewState["OrderByKey"].ToString();
        pager.OrderType = (bool)ViewState["OrderByType"];

        GridView1.DataSource = pager.GetTable();
        GridView1.DataBind();
    }
Пример #5
0
    private void GridBind()
    {
        MojoCube.Api.UI.AdminPager pager = new MojoCube.Api.UI.AdminPager(ListPager);
        pager.PageSize     = MojoCube.Web.String.PageSize();
        pager.ConnStr      = MojoCube.Web.Connection.ConnString();
        pager.TableName    = "Site_Service";
        pager.strGetFields = "*";

        string where = "Language='" + MojoCube.Api.UI.Language.GetLanguage() + "'";

        if (txtKeyword.Text.Trim() != "")
        {
            string keyword = MojoCube.Api.Text.CheckSql.Filter(txtKeyword.Text.Trim());
            where += " and (Title like '%" + keyword + "%')";
        }

        pager.where     = where;
        pager.fldName   = ViewState["OrderByKey"].ToString();
        pager.OrderType = (bool)ViewState["OrderByType"];

        GridView1.DataSource = pager.GetTable();
        GridView1.DataBind();
    }
Пример #6
0
    private void GridBind()
    {
        EmptyDiv.Visible = false;

        MojoCube.Api.UI.AdminPager pager = new MojoCube.Api.UI.AdminPager(ListPager);
        pager.PageSize     = 5;
        pager.ConnStr      = MojoCube.Web.Connection.ConnString();
        pager.TableName    = "Memo_List";
        pager.strGetFields = "*";

        string where = "fk_User="******"UserID"].ToString();

        pager.where     = where;
        pager.fldName   = "IsStar desc,ModifyDate";
        pager.OrderType = true;

        GridView1.DataSource = pager.GetTable();
        GridView1.DataBind();

        if (GridView1.Rows.Count == 0)
        {
            EmptyDiv.Visible = true;
        }
    }