?? header.cs
字號:
namespace Employee_Directory
{
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public class Header : System.Web.UI.UserControl
{
//標題窗口定義控件的聲名
//創(chuàng)建自定義Utility類對象
protected CCUtility Utility;
//定義各表單事件保護字符串
protected string Header_FormAction=".aspx?";
//初始化事件
public Header()
{
this.Init += new System.EventHandler(Page_Init);
}
// Header中的自定義包含控件結束
public void ValidateNumeric(object source, ServerValidateEventArgs args) {
try{
Decimal temp=Decimal.Parse(args.Value);
args.IsValid=true;
}catch{
args.IsValid=false; }
}
//定義登錄窗口顯示控件過程
//初始化頁面過程,創(chuàng)建一個Utility實例,并調用其相應的各方法
protected void Page_Load(object sender, EventArgs e)
{
Utility=new CCUtility(this);
if (!IsPostBack){
Page_Show(sender, e);
}
}
//頁面關閉過程
protected void Page_Unload(object sender, EventArgs e)
{
if(Utility!=null) Utility.DBClose();
}
//窗口中控件定義事件處理過程
protected void Page_Init(object sender, EventArgs e)
{
InitializeComponent();
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
this.Unload += new System.EventHandler(this.Page_Unload);
}
//定義整體顯示頁面過程
protected void Page_Show(object sender, EventArgs e)
{
Header_Show();
}
// Header Show end
//完成表單初始化
protected void Header_Show(){
//顯示標題各內容
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -