zoukankan      html  css  js  c++  java
  • 【开源】QuickPager ASP.NET2.0分页控件V2.0.0.1——分页控件的源码 (二)


    namespace JYK.Controls.PageManage
    {
        
    /// <summary>
        
    /// 生成分页控件需要的SQL语句
        
    /// </summary>

        public class PageSQL
        
    {
            
    /// <summary>
            
    /// 分页控件的实例
            
    /// </summary>

            public JYKPage myPage = null;
         
            
    生成分页用的SQL语句的模版


            
    生成SQL语句模版、获取总记录数,计算页数。

            
    获取分页用的SQL语句


        }

    }

    namespace JYK.Controls.PageManage
    {
        
    /// <summary>
        
    /// 负责绘制分页控件的显示内容
        
    /// </summary>

        public class PageUI
        
    {
            
    /// <summary>
            
    /// 分页控件的实例
            
    /// </summary>

            public JYKPage myPage = null;

            
    /// <summary>
            
    /// 客户端ID
            
    /// </summary>

            public string BtnClientID = "";

            
    /// <summary>
            
    /// 添加UI
            
    /// </summary>

            public virtual void AddPageUI()
            
    {
                AddPageDataInfo();
                AddPageNavi();
                AddPageText();
             }


            
    添加记录数等的显示

            
    修改当前页号

            
    添加上一页等

            
    //导航
            页面导航

            
    修改

            
    重新计算导航页号

            
    生成导航的html



        }

    }


    namespace JYK.Controls.PageManage
    {
        
    /// <summary>
        
    /// 依据PageSQL提供的SQL语句,通过数据访问函数库到数据库里提取数据
        
    /// </summary>

        public class PageGetData
        
    {
            
    /// <summary>
            
    /// 分页控件的实例
            
    /// </summary>

            public JYKPage myPage = null;
            
            
    /// <summary>
            
    /// 返回DataTable记录集
            
    /// </summary>
            
    /// <param name="PageIndex">页号。从1开始计数</param>
            
    /// <returns></returns>

            public DataTable GetDataTable(Int32 PageIndex)
            
    {
                
    string sql = myPage.ManagerPageSQL.GetSQL(PageIndex);
                
    return myPage.DAL.RunSqlDataTable(sql);
            }


            
    //public T GetDataList<T>(Int32 PageIndex)
            
    //{
            
    //    string sql = myPage.ManagerPageSQL.GetSQL(PageIndex);
            
    //    return myPage.DAL.RunSqlDataTable(sql);
            
    //}

        }

    }

  • 相关阅读:
    C# 中自定义配置
    git 打标签
    状态模式
    组合模式
    intellij自动生成java代码注释(java文件注释和方法注释)
    git版本回退
    Error:Unable to make the module:***, related gradle configuration was not found. Please, re-import the Gradle project and try again.
    Typo: In word 拼写检查
    javax.persistence.EntityNotFoundException: Unable to find报错
    报错org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet"
  • 原文地址:https://www.cnblogs.com/jyk/p/1229973.html
Copyright © 2011-2022 走看看