第三次课,先从逻辑概念设计,业务层的操做方法,即CRUD通用方法的定义,而后逐步去完善功能。ide
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; //BLL也须要添加对Model的引用; using Model; // 添加引用 using System.Data; //须要添加对DAL 层的引用; using DAL; namespace BLL { //至关于服务员: public class DeptService { //1.增长后厨对象; DeptDao deptDao = new DeptDao(); //CRUD:增长 U:修改 D:删除;R:检索 public bool addDept(Dept dept) { return deptDao.addDept(dept); } public bool updateDept(Dept dept) { return deptDao.updateDept(dept); } public bool delDept(Dept dept) { return deptDao.delDept(dept); } public DataTable findDeptByName(String deptName) { return deptDao.findDeptByName(deptName); } public DataTable refreshData() { return deptDao.refreshData(); } } }