using System; using DeiNiu.wms.Data.Model; using System.Data; namespace DeiNiu.wms.Logical { [Serializable] public class LlessonEmp { Lesson _obj; private TrainingDetail _trainObj; public LlessonEmp() { Initialize(); } public Lesson GetLesson { get { return _obj; } } public TrainingDetail GetTrainingDetail { get { return _trainObj; } } /// /// get all data /// public DataSet GetAllData() { return _obj.Query(); } /// /// get all data /// public DataSet GetAllActiveData() { return _obj.QueryActived(); } /* private void leavetypeDsConstruct() { return; } */ /// /// get a record by id /// public void Initialize(int id) { _obj = id != 0 ? new Lesson(id) : new Lesson(); } /// /// get a record by id 0 /// public void Initialize() { Initialize(0); _trainObj = new TrainingDetail(); } /// /// 取得学员课程列表 /// /// /// public DataTable GetLessionsByEmp(int empId) { return new LEmployee().GetLessons(empId); } /// /// 根据课程取得学员列表 /// /// /// public DataTable GetEmpByLesson(int lesson) { return _obj.GetEmpByLesson(lesson); } public DataTable GetAllDepartments() { return new Department().QueryActived().Tables[0]; } public DataTable GetAllEmployee() { return new Employee().QueryActived().Tables[0]; } public DataTable GetAllCategories() { return new LessonCategory().QueryActived().Tables[0]; } } }