ldj/Logical/LlessonEmp.cs

110 lines
2.2 KiB
C#
Raw Normal View History

2023-05-23 16:13:17 +08:00
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;
}
}
/// <summary>
/// get all data
/// </summary>
public DataSet GetAllData()
{
return _obj.Query();
}
/// <summary>
/// get all data
/// </summary>
public DataSet GetAllActiveData()
{
return _obj.QueryActived();
}
/*
private void leavetypeDsConstruct()
{
return;
}
*/
/// <summary>
/// get a record by id
/// </summary>
public void Initialize(int id)
{
_obj = id != 0 ? new Lesson(id) : new Lesson();
}
/// <summary>
/// get a record by id 0
/// </summary>
public void Initialize()
{
Initialize(0);
_trainObj = new TrainingDetail();
}
/// <summary>
/// ȡ<><C8A1>ѧԱ<D1A7>γ<EFBFBD><CEB3>б<EFBFBD>
/// </summary>
/// <param name="empId"></param>
/// <returns></returns>
public DataTable GetLessionsByEmp(int empId)
{
return new LEmployee().GetLessons(empId);
}
/// <summary>
/// <20><><EFBFBD>ݿγ<DDBF>ȡ<EFBFBD><C8A1>ѧԱ<D1A7>б<EFBFBD>
/// </summary>
/// <param name="lesson"></param>
/// <returns></returns>
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];
}
}
}