偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

ASP.NET 2.0數(shù)據(jù)教程:在業(yè)務邏輯層添加方法

開發(fā) 后端
本文介紹了如何在asp.net 2.0中在業(yè)務邏輯層添加方法 GetEmployeesByHiredDateMonth(month)。

因為我們的程序架構(gòu)使用了單獨的一層來處理業(yè)務邏輯(業(yè)務邏輯層)和數(shù)據(jù)邏輯,我們需要在BLL里增加一個方法,該方法調(diào)用DAL的方法獲取指定月份里雇用的員工。打開文件EmployeesBLL.cs并添加下面這個方法:

  1. [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]  
  2.  
  3. public Northwind.EmployeesDataTable GetEmployeesByHiredDateMonth(int month)  
  4.  
  5. {  
  6.  
  7.     return Adapter.GetEmployeesByHiredDateMonth(month);  
  8.  
  9. }  

和此類里的其他方法一樣,GetEmployeesByHiredDateMonth(month)僅僅是簡單地調(diào)用DAL并返回結(jié)果。在業(yè)務邏輯層添加方法基本上都是這樣。

【編輯推薦】

  1. ASP.NET 2.0數(shù)據(jù)教程:插入,更新和刪除數(shù)據(jù)
  2. ASP.NET 2.0數(shù)據(jù)教程:給數(shù)據(jù)訪問層添加參數(shù)化的方法
  3. ASP.NET 2.0數(shù)據(jù)教程:創(chuàng)建數(shù)據(jù)訪問層
  4. ASP.NET 2.0數(shù)據(jù)教程:創(chuàng)建一個Web項目,配置數(shù)據(jù)庫連接
  5. ASP.NET 2.0數(shù)據(jù)教程:給DataRow添加字段級驗證
責任編輯:book05 來源: 博客堂
相關(guān)推薦

2009-07-27 09:28:55

TableAdapte

2009-07-24 13:08:03

BLL類ASP.NET 2.0

2009-07-24 13:45:28

添加參數(shù)化

2009-07-24 13:25:43

創(chuàng)建數(shù)據(jù)訪問層

2009-07-27 03:21:00

breadcrumb導

2009-07-24 17:08:31

添加站點地圖asp.net

2009-07-24 14:15:51

數(shù)據(jù)訪問層

2009-07-27 08:51:24

ObjectDataS

2009-07-24 16:55:53

添加aspx頁面

2009-07-24 17:15:52

SiteMapData

2009-07-27 16:09:05

GridView顯示數(shù)

2009-07-24 13:08:52

DataRowASP.NET 2.0

2009-07-24 14:23:16

定制編碼DAL

2009-07-24 12:41:21

BLL類

2009-07-24 16:37:04

創(chuàng)建母版頁asp.net 2.0

2009-07-27 16:22:54

GridView選擇行

2009-07-27 09:01:44

ObjectDataS

2010-06-25 08:51:46

ASP.NET MVC

2009-07-27 09:39:04

SelectMetho

2009-07-23 14:43:24

數(shù)據(jù)源控件ASP.NET 2.0
點贊
收藏

51CTO技術(shù)棧公眾號