ldj/Logical/Llesson.cs

75 lines
1.4 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 Llesson
{
Lesson _obj;
public Llesson()
{
Initialize();
}
public Lesson GetLesson
{
get
{
return _obj;
}
}
/// <summary>
/// get all data
/// </summary>
public DataSet GetAllData()
{
return _obj.Query();
}
/// <summary>
/// get all data
/// </summary>
public DataSet GetAllActiveData()
{
return _obj.QueryActived();
}
/// <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);
}
/// <summary>
/// ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀγ<C4BF><CEB3>б<EFBFBD>
/// </summary>
/// <returns></returns>
public DataTable GetLessonsByCat(int catId)
{
return _obj.GetActivedLessonsByCat( catId);
}
public DataTable GetAllActivedCategories()
{
return new LessonCategory().QueryActived().Tables[0];
}
}
}