cs/en_page.cs

(开头部分) 13KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Web;
using System.Data.OleDb;


public class en_page
{

    /// <summary>
    /// x是分页显示行数,sqls是数据表名或者可以后面加条件语句,username是超链接标签里别的字段,p 是当前的页数 pax是url分页的名称,sql_id 返回字段的id style_int 分页样式
    /// </summary>
    /// <param name="x"></param>
    /// <returns></returns>
    /// 
    public static string fystr_one(int x, string sqls, string username, int p, string pax, string sql_id)
    {
        //下面是分页代码
        string fystring = "select count(" + sql_id + ") from " + sqls;
        int num = 0;//总页数
        num = Convert.ToInt32(new access().ExecuteScalar(fystring));

        return fsstr_one_nei(num, x, p, username, pax);
    }
    public static string fystr_one(int x, string sqls, string username, int p, string pax, string sql_id, int style_int)
    {
        //下面是分页代码
        string fystring = "select count(" + sql_id + ") from " + sqls;
        int num = 0;//总页数
        num = Convert.ToInt32(new access().ExecuteScalar(fystring));

        return fsstr_style(style_int) + "\n" + fsstr_one_nei(num, x, p, username, pax);
    }
    public static string fystr_one(int x, string sqls, string username, int p, string pax, string sql_id, int style_int, OleDbParameter[] parameters)
    {
        //下面是分页代码
        string fystring = "select count(" + sql_id + ") from " + sqls;
        int num = 0;//总页数
        num = Convert.ToInt32(new access().ExecuteScalar(fystring, parameters));
        return fsstr_style(style_int) + "\n" + fsstr_one_nei(num, x, p, username, pax);

    }
    private static string fsstr_one_nei(int num, int x, int p, string username, string pax)
    {
        #region 分页
        System.Text.StringBuilder templateBuilder = new System.Text.StringBuilder();
        //以上是获得总页数

        int allNum = 0; //一共有几页

        if (num % x == 0)
        {

            allNum = num / x;   //最大有多少页(整除)

        }
        else
        {

            allNum = num / x + 1;  //最大有多少页 (不整除)
后面还有 210 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。