參考ASP.NET2.0學習2--程序架構中的業務邏輯的定義
public class EmployeeRule
{
public bool insert(string txtEid,string txtName,string txtAge)
{
//調用數據訪問層對象相應方法
}
}
其它業務方法類似(Update,Delete,Select)
綁定到GridView控件
1.設置ObjectDataSource 連接到EmployeeRule類,並設置它的select ,update,delete,insert方法
2.設置GridView的DataSourceId爲ObjectDataSource