75 lines
1.4 KiB
C#
75 lines
1.4 KiB
C#
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>
|
|
/// Ö¸¶¨Àà±ðµÄ¿Î³ÌÁбí
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public DataTable GetLessonsByCat(int catId)
|
|
{
|
|
return _obj.GetActivedLessonsByCat( catId);
|
|
}
|
|
|
|
public DataTable GetAllActivedCategories()
|
|
{
|
|
return new LessonCategory().QueryActived().Tables[0];
|
|
}
|
|
}
|
|
|
|
|
|
}
|