`
gauss2008
  • 浏览: 40166 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Codematic2.0中的PageControl部分源代码 -2

阅读更多

 Source Code of Page02.cs

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Gauss.PageControl
...{
    [DefaultProperty(
"Text")]
    [ToolboxData(
"<{0}:Page02 runat=server></{0}:Page02>")]
    
public class Page02 : WebControl
    
...{
        
// Fields
        private int page_Count;
        
private int page_Current;
        
private string page_Index;
        
private int page_Size;
        
private int page_width;
        
private int pageStep;

        
public Page02()
        
...{
            
this.page_Size = 10;
            
this.page_Current = 1;
            
this.page_Index = "index.aspx";
            
this.pageStep = 6;
            
this.page_width = 700;
        }

        
public int Page_Count
        
...{
            
get
            
...{
                
return this.page_Count;
            }

            
set
            
...{
                
this.page_Count = value;
            }

        }

        
public int Page_Current
        
...{
            
get
            
...{
                
return this.page_Current;
            }

            
set
            
...{
                
this.page_Current = value;
            }

        }


        
public string Page_Index
        
...{
            
get
            
...{
                
return this.page_Index;
            }

            
set
            
...{
                
this.page_Index = value;
            }

        }


        
public int Page_Size
        
...{
            
get
            
...{
                
return this.page_Size;
            }

            
set
            
...{
                
this.page_Size = value;
            }

        }


        [Bindable(
true), DefaultValue(""), Category("Appearance")]
        
public int Page_Width
        
...{
            
get
            
...{
                
return this.page_width;
            }

            
set
            
...{
                
this.page_width = value;
            }

        }


        
public int PageStep
        
...{
            
get
            
...{
                
return this.pageStep;
            }

            
set
            
...{
                
this.pageStep = value;
            }

        }


        
protected override void Render(HtmlTextWriter output)
        
...{
            StringBuilder builder1 
= new StringBuilder("");
            builder1.Append(
"<table width="" + this.page_width + "" border="0" cellspacing="0" cellpadding="0" align="center" height="22"> ");
            builder1.Append(
" <tr> ");
            builder1.Append(
" <td width="171">");
            builder1.Append(
string.Concat(new object[] ..."○ 页次:<font color="#e78a29">"this.Page_Current, "</font>/"this.Page_Count, ",每页:<font color='#e78a29'>"this.Page_Size, "</font>条</td> " }));
            builder1.Append(
" <td width="529"> ");
            builder1.Append(
" <div align="right">页数: ");
            
int num1 = 1;
            
if (this.Page_Current > this.PageStep)
            
...{
                num1 
= this.Page_Current - this.PageStep;
            }

            
else
            
...{
                num1 
= 1;
            }

            
int num2 = num1 + (2 * this.PageStep);
            
if ((num1 + (2 * this.PageStep)) > this.Page_Count)
            
...{
                
if (((2 * this.PageStep) + 1> this.Page_Count)
                
...{
                    num1 
= 1;
      &nbs
分享到:
评论

相关推荐

    codematic2.0

    codematic2.0 给大家共享的哦 借花献佛哦

    Codematic .Net代码自动生成器 Alpha版Net 2.0版

    Codematic .Net代码自动生成器 Alpha版Net 2.0版 Codematic .Net代码自动生成器 Alpha版Net 2.0版

    三层代码生成软件--Codematic(安装包)

    三层代码生成软件--Codematic,三层代码生成软件--Codematic

    Codematic.Net代码自动生成器

    Codematic 是一款为C#数据库程序员设计的自动代码生成器,Codematic 生成的代码基于基于面向对象的思想和三层架构设计,结合了Petshop中经典的思想和设计模式,融入了工厂模式,反射机制等等一些思想。采用 Model + ...

    codematic2 c# 代码生成器.rar(2011-8-15)

    codematic2 c# 代码生成器.rar (2011-8-15)最新版 可以根据数据库生成对应的c#类 存储过程 sql语句 以及对应增删改查的页面aspx文件 和cs文件 是.net程序员的必备软件 Codematic (原名:LTP.Net代码自动生成器)是...

    Codematic2.zip

    Codematic2.0基于VS2005(.Net2.0)开发,无论是功能上还是UI使用上都增强了许多,提供了更丰富的代码生成方式。此版本还修正了使用过程中用户反馈的一些问题和bug。该版本仍是一个开发中的版

    codematic2.rar

    codematic2主要实现对C#的分层代码的自动生成功能.

    Codematic .Net代码自动生成器 Beta版(.Net 2.0版)

    Codematic (2.0版)是一款为 C# 数据库程序员设计的自动代码生成器,Codematic 生成的代码基于基于面向对象的思想和三层架构设计,结合了Petshop中经典的思想和设计模式,融入了工厂模式,反射机制等等一些思想。...

    动软代码生成器—codematic2

    动软代码生成器—codematic2动软代码生成器—codematic2动软代码生成器—codematic2

    Codematic .Net代码自动生成器

    Codematic2.0基于VS2005(.Net2.0)开发,无论是功能上还是UI使用上都增强了许多,提供了更丰富的代码生成方式。此版本还修正了使用过程中用户反馈的一些问题和bug。该版本仍是一个开发中的版本。同时考虑到很多人仍在...

    Codematic2 代码生成器

    Codematic2 一个代码生成工具 能够连接数据库生成实体类,生成三层架构 很好用的一个软件 谁用谁知道

    代码生成工具 Codematic2

    Codematic2 代码生成工具,可以使用也可以借鉴其中的逻辑,很不错的!

    一个产品管理系统 v2.0_codematic.zip源码ASP.NET网站源码打包下载

    一个产品管理系统 v2.0_codematic.zip源码ASP.NET网站源码打包下载一个产品管理系统 v2.0_codematic.zip源码ASP.NET网站源码打包下载一个产品管理系统 v2.0_codematic.zip源码ASP.NET网站源码打包下载一个产品管理...

    Codematic2.msi 代码生成器

    代码生成器,可以生成NHibernate等orm数据库实体

    .net动软代码生成器Codematic2

    .net动软代码生成器Codematic2

    codematic2

    动软.Net代码生成器Codematic 是一款为C#程序员设计的自动代码生成器,Codematic 生成的代码基于面向对象的思想和三层架构设计,结合了Petshop中经典的思想和设计模式,融入了工厂模式,反射机制等等一些思想。...

    Codematic2

    动软.Net代码生成器Codematic 是一款为C#程序员设计的自动代码生成器,Codematic 生成的代码基于面向对象的思想和三层架构设计,结合了Petshop中经典的思想和设计模式,融入了工厂模式,反射机制等等一些思想。...

    一个产品管理系统 v2.0_codematic.zip

    一个产品管理系统 v2.0_codematic

    动软代码生成器Codematic2.msi

    动软代码生成器Codematic2,可以根据你的设置,很好的生成代码,快速开发

Global site tag (gtag.js) - Google Analytics