当前位置: 首页>>代码示例>>C#>>正文


C# JpCommon.OutPageList方法代码示例

本文整理汇总了C#中TPortalClass.JpCommon.OutPageList方法的典型用法代码示例。如果您正苦于以下问题:C# JpCommon.OutPageList方法的具体用法?C# JpCommon.OutPageList怎么用?C# JpCommon.OutPageList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TPortalClass.JpCommon的用法示例。


在下文中一共展示了JpCommon.OutPageList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RptBind

    private void RptBind()
    {
        if (this.Request.QueryString["page"] != null)
            this.page = int.Parse(this.Request.QueryString["page"].ToString());
        else
            this.page = 1;

        this.txtKeywords.Text = this.keywords;
        txtPageNum.Text = this.pageSize.ToString();
        txtPage.Text = this.page.ToString();

        TPortalClass.JpHelp JpHelp = new TPortalClass.JpHelp();

        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        string ls_key = JpCommon.Filter(this.txtKeywords.Text.Trim());

        DataTable dt = new DataTable();
        string ls_where = "  and   hy_content  like '%" + ls_key + "%' ";
        dt = JpHelp.SearchdocsByKey(ls_where, "   order by hy_ifsh ", Convert.ToInt32(txtPage.Text), 10);
        this.totalCount = JpHelp.SearchdocsByKeyNum(ls_where);

        rptList.DataSource = dt;

        rptList.DataBind();

        string pageUrl = JpCommon.CombUrlTxt("list_help_sh.aspx", "page={0}&rnd={1}&keywords={2}",
            "__id__", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "");
        PageContent.InnerHtml = JpCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:list_help_sh.aspx.cs

示例2: RptBind

    private void RptBind()
    {
        if (this.Request.QueryString["page"] != null)
            this.page = int.Parse(this.Request.QueryString["page"].ToString());
        else
            this.page = 1;

        this.txtKeywords.Text = this.keywords;
        //this.ddlcolname.SelectedValue = this.deptid;
        txtPageNum.Text = this.pageSize.ToString();
        txtPage.Text = this.page.ToString();

        TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
        DataTable dt;
        TPortalClass.JpRoleuser JpRoleuser = new TPortalClass.JpRoleuser();
        dt = JpArticle.GetArticlesBycidAnduidAndtitle_tg(this.txtcid.Text, this.Session["uid"].ToString(), txtKeywords.Text);

        this.totalCount = dt.Rows.Count;
        DataTable tempTable = dt.Clone();
        for (int i = (this.page - 1) * this.pageSize; i < this.page * this.pageSize; i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            tempTable.Rows.Add(dr);
        }
        rptList.DataSource = tempTable;
        rptList.DataBind();

        //翻页
        //string pageUrl = Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
        //        this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, "__id__");
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        //TPortalClass.JpRoleuser JpRoleuser = new TPortalClass.JpRoleuser();
        string pageUrl;
        pageUrl = JpCommon.CombUrlTxt("list_article_tg.aspx", "page={0}&rnd={1}&keywords={2}&cid={3}&input={4}",
            "__id__", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "", "" + this.txtcid.Text + "", "" + this.Session["uid"].ToString() + "");

        PageContent.InnerHtml = JpCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:45,代码来源:list_article_tg.aspx.cs

示例3: RptBind

    private void RptBind()
    {
        if (this.Request.QueryString["page"] != null)
            this.page = int.Parse(this.Request.QueryString["page"].ToString());
        else
            this.page = 1;

        this.txtKeywords.Text = this.keywords;
        txtPageNum.Text = this.pageSize.ToString();
        txtPage.Text = this.page.ToString();

        TPortalClass.JpComment JpComment = new TPortalClass.JpComment();
        DataTable dt = JpComment.Getdocs_ysh();
        this.totalCount = dt.Rows.Count;
        DataTable tempTable = dt.Clone();
        for (int i = (this.page - 1) * this.pageSize; i < this.page * this.pageSize; i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            tempTable.Rows.Add(dr);
        }
        rptList.DataSource = tempTable;
        rptList.DataBind();

        //翻页
        //string pageUrl = Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
        //        this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, "__id__");
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        string pageUrl = JpCommon.CombUrlTxt("list_comment_ysh.aspx", "page={0}&rnd={1}&keywords={2}",
            "__id__", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "");
        PageContent.InnerHtml = JpCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:38,代码来源:list_comment_ysh.aspx.cs

示例4: RptBind

    private void RptBind()
    {
        if (this.Request.QueryString["page"] != null)
            this.page = int.Parse(this.Request.QueryString["page"].ToString());
        else
            this.page = 1;

        this.txtKeywords.Text = this.keywords;
        txtPageNum.Text = this.pageSize.ToString();
        txtPage.Text = this.page.ToString();

        TPortalClass.JpActivityusers JpActivityusers = new TPortalClass.JpActivityusers();

        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        string ls_key = JpCommon.Filter(this.txtKeywords.Text.Trim());

        DataTable dt = new DataTable();
        string sql = "";
        sql = "  Select top 10 a.hy_bt,b.hy_name,b.hy_tel,b.hy_addtime,b.hy_ifsh,b.hy_id,b.id  from hy_activity a,hy_activityusers b   ";
        sql += "  where 1=1 and  b.hy_id=a.id  and a.hy_bt like '%" + ls_key + "%'  and a.id  not in(select top 0 a.id   ";
        sql += "   from hy_activity a,hy_activityusers b  where 1=1 and hy_bt like '%" + ls_key + "%'  order by a.hy_sort desc,b.hy_sort desc )  ";
        sql += "   order by a.hy_sort desc,b.hy_sort desc";
        TPortalClass.DAO db = new TPortalClass.DAO();
        dt = db.GetDataTable(sql);

        string sql_count = "Select count(*) as num  from hy_activity a,hy_activityusers b";
        sql_count += "  where 1=1 and  b.hy_id=a.id  and a.hy_bt like '%" + ls_key + "%' ";
        DataTable dt_count = db.GetDataTable(sql_count);
        if (dt_count.Rows.Count > 0)
        {
            this.totalCount = Convert.ToInt32(dt_count.Rows[0]["num"].ToString());
        }
        else
        {
            this.totalCount = 0;
        }

        rptList.DataSource = dt;
        rptList.DataBind();

        string pageUrl = JpCommon.CombUrlTxt("list_activityusers.aspx", "page={0}&rnd={1}&keywords={2}",
            "__id__", "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "");
        PageContent.InnerHtml = JpCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:44,代码来源:list_activityusers.aspx.cs

示例5: RptBind

    private void RptBind()
    {
        if (this.Request.QueryString["page"] != null)
            this.page = int.Parse(this.Request.QueryString["page"].ToString());
        else
            this.page = 1;

        txtPageNum.Text = this.pageSize.ToString();
        txtPage.Text = this.page.ToString();

        string uid = txtuid.Text;
        string cid = txtcid.Text;

        TPortalClass.JpColumns JpColumns = new TPortalClass.JpColumns();
        TPortalClass.JpRoles JpRoles = new TPortalClass.JpRoles();
        DataTable dt = new DataTable();
        if (this.txtcid.Text == "")
            dt = JpColumns.GetFirstlevcolumns_online();
        else
            dt = JpColumns.GetSubColumnsOrderbysort_online(this.txtcid.Text);

        this.totalCount = dt.Rows.Count;

        DataTable tempTable = dt.Clone();
        tempTable.Columns.Add(new DataColumn("authorchecked", typeof(string)));
        tempTable.Columns.Add(new DataColumn("editorchecked", typeof(string)));

        for (int i = (this.page - 1) * this.pageSize; i < this.page * this.pageSize; i++)
        {
            if (i > dt.Rows.Count - 1)
                break;

            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }

            if (JpRoles.ifhaveAuthorRoleBycidanduid(this.txtuid.Text, dt.Rows[i]["cid"].ToString()) == true)
                dr["authorchecked"] = "checked";
            else
                dr["authorchecked"] = "";

            if (JpRoles.ifhaveEditorRoleBycidanduid(this.txtuid.Text, dt.Rows[i]["cid"].ToString()) == true)
                dr["editorchecked"] = "checked";
            else
                dr["editorchecked"] = "";

            tempTable.Rows.Add(dr);
        }

        this.rptList.DataSource = tempTable;
        this.rptList.DataBind();

        //翻页
        //string pageUrl = Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}",
        //        this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property, "__id__");
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        string pageUrl = JpCommon.CombUrlTxt("main_columnrole.aspx", "page={0}&rnd={1}&cid={2}&uid={3}",
            "__id__", System.Guid.NewGuid().ToString(), cid, uid);
        PageContent.InnerHtml = JpCommon.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:62,代码来源:main_columnrole.aspx.cs


注:本文中的TPortalClass.JpCommon.OutPageList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。