Codematic2.0中的PageControl部分源代码 -3
2010-01-29 14:26
204 查看
Source code of Page1
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}:Page01 runat=server></{0}:Page01>")] public class Page01 : WebControl { // Fields private string page_Add; private int page_Count; private int page_Current; private string page_Index; private string page_Makesql; private string page_Search; private int page_Size; private int page_width; private int record_Count; public Page01() { this.page_Size = 10; this.page_Current = 1; this.page_Index = "index.aspx"; this.page_Add = "add.aspx"; this.page_Search = "search.aspx"; this.page_Makesql = "makesql.aspx"; this.page_width = 700; } public string Page_Add { get { return this.page_Add; } set { this.page_Add = value; } } 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 string Page_Makesql { get { return this.page_Makesql; } set { this.page_Makesql = value; } } public string Page_Search { get { return this.page_Search; } set { this.page_Search = value; } } public int Page_Size { get { return this.page_Size; } set { this.page_Size = value; } } [DefaultValue(""), Bindable(true), Category("Appearance")] public int Page_Width { get { return this.page_width; } set { this.page_width = value; } } public int Record_Count { get { return this.record_Count; } set { this.record_Count = value; } } protected override void Render(HtmlTextWriter output) { StringBuilder builder1 = new StringBuilder(""); builder1.Append("<table width=/"" + this.page_width + "/" border=/"0/" cellspacing=/"0/" cellpadding=/"2/" align=/"center/" height=/"22/">/n"); builder1.Append("/t<tr>/n"); builder1.Append("/t/t<td width=/"28%/">"); builder1.Append(string.Concat(new object[] { "/u25cb /u5171", this.Record_Count, "/u6761/uff0c/u5171", this.Page_Count, "/u9875/uff0c/u7b2c<font color=/"#e78a29/">", this.Page_Current, "</font>/u9875</td>/n" })); builder1.Append("/t/t<td width=/"72%/">"); builder1.Append("/t/t<div align=/"right/">/n"); if (this.Page_Makesql != "") { builder1.Append("/t/t/t[ <a href=" + this.Page_Makesql + " mce_href=" + this.Page_Makesql + ">/u5168/u90e8</a> ] /n"); } if (this.Page_Add != "") { builder1.Append("/t/t/t[ <a href=" + this.Page_Add + " mce_href=" + this.Page_Add + ">/u6dfb/u52a0</a> ] /n"); } if (this.Page_Search != "") { builder1.Append("/t/t/t[ <a href=" + this.Page_Search + " mce_href=" + this.Page_Search + ">/u641c/u7d22</a> ] /n"); } builder1.Append("/t/t/t[ <a href=" + this.Page_Index + " mce_href=" + this.Page_Index + ">/u5237/u65b0</a> ] ["); if (this.Page_Current > 1) { builder1.Append("/t/t/t<a href=" + this.Page_Index + " mce_href=" + this.Page_Index + "?page=1>/u9996/u9875</a>/n"); } else { builder1.Append("/t/t/t<font color=#cccccc>/u9996/u9875</font> /n"); } builder1.Append("] ["); if ((this.Page_Current - 1) > 0) { builder1.Append(string.Concat(new object[] { "/t/t/t<a href=", this.Page_Index, " mce_href=", this.Page_Index, "?page=", this.Page_Current - 1, ">/u4e0a/u9875</a>/n" })); } else { builder1.Append("/t/t/t<font color=#cccccc>/u4e0a/u9875</font> /n"); } builder1.Append("] ["); if ((this.Page_Current + 1) <= this.Page_Count) { builder1.Append(string.Concat(new object[] { "/t/t/t<a href=", this.Page_Index, " mce_href=", this.Page_Index, "?page=", this.Page_Current + 1, ">/u4e0b/u9875</a> /n" })); } else { builder1.Append("/t/t/t<font color=#cccccc>/u4e0b/u9875</font> /n"); } builder1.Append("] ["); if (this.Page_Current < this.Page_Count) { builder1.Append(string.Concat(new object[] { "/t/t/t<a href=", this.Page_Index, " mce_href=", this.Page_Index, "?page=", this.Page_Count, ">/u5c3e/u9875</a>/n" })); } else { builder1.Append("/t/t/t<font color=#cccccc>/u5c3e/u9875</font>/n"); } builder1.Append("]"); builder1.Append("/t/t</div>/n"); builder1.Append("/t/t</td>/n"); builder1.Append("/t</tr>"); builder1.Append("</table>/n"); output.Write(builder1.ToString()); } } }
相关文章推荐
- Codematic2.0中的PageControl部分源代码 -2
- Codematic2.0中的PageControl部分源代码 -4
- MapViewControl的源代码(部分)
- PageLayoutControl 对象
- BAPI / RFC with Delphi(系列之二)--TSAPLogonControl使用(有对话框的登录sap的delphi源代码)
- 【转】Web Control 开发系列(二) 深入解析Page的PostBack过程和IPostBackDataHandler
- 当一个窗体上有PageControl 控件时,是先执行 FormShow呢,还是先执行PageControl 的 TabSheet2Show呢
- 我的开发笔记---UIPageControl的详细使用
- 项目管理实践教程二、源代码控制【Source Control Using VisualSVN Server and TortoiseSVN】
- 《ArcGIS Engine+C#实例开发教程》第三讲 MapControl与PageLayoutControl同步
- scrollview和pageControl
- Slider Page Control
- dbm数据库源代码分析(15):dbm部分
- How to hide TabPage from TabControl
- FFmpeg的H.264解码器源代码简单分析:熵解码(Entropy Decoding)部分
- x264源代码简单分析:宏块分析(Analysis)部分-帧间宏块(Inter)
- RTMPdump(libRTMP) 源代码分析 7: 建立一个流媒体连接 (NetStream部分 2)
- ffdshow 源代码分析 3: 位图覆盖滤镜(设置部分Settings)
- 自制一个小巧的时钟(部分源代码)---VC
- Windows 10(UWP)开发技巧 - PageUserControl