在Asp
實際使用時
class FormBase
class BizFormBase
class ViewFormBase : BizFormBase
class EditFormBase : BizFormBase
class QueryFormBase : FormBase
FormBase
BizFormBase
ViewFormBase
QueryFormBase
從面向對象的角度看
為了幫助大家理解
一個最簡單的查詢頁面會包括三部分
QueryPeopleForm
OnQueryButtonClick()
{
string peopleName = txtPeopleName
string peopleAge = txtPeopleAge
string sql;
sql = string
PeopleManager manager = new PeopleManager();
this
this
}
當點擊查詢按鈕時
這兒的提交查詢和綁定在不同的查詢頁面都是一樣的
使用基類頁後的代碼
QueryPeopleForm : QueryFormBase
OnQueryButtonClick()
{
string peopleName = txtPeopleName
string peopleAge = txtPeopleAge
sql = string
QueryAndBind(new PeopleManager()
}
[
From:http://tw.wingwit.com/Article/program/net/201311/15132.html