using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using CY.IDAL.Inquiry;
|
using AbstractFactory;
|
using CY.Model;
|
using CY.Infrastructure.Query;
|
using CY.IDAL;
|
using CY.IBaseDAL;
|
using CY.Infrastructure;
|
namespace CY.BLL.Inquiry
|
{
|
/// <summary>
|
/// 纸张类别相关业务逻辑类
|
/// </summary>
|
public class PaperTypeBLL
|
{
|
IPaperTypeDAL _iPaperTypeDAL = null;
|
|
public PaperTypeBLL()
|
{
|
_iPaperTypeDAL = Factory.GetDALByInterfaceName(DALInterface.IPaperTypeDAL) as IPaperTypeDAL;
|
}
|
|
/// <summary>
|
/// 分页返回纸张类别列表
|
/// </summary>
|
/// <param name="brandName">品牌名称</param>
|
/// <param name="pagination">分页参数</param>
|
/// <returns></returns>
|
public IEnumerable<Model.SysInquiry_PaperType> SelectModelPage(string typeName,int status,Infrastructure.Query.Pagination pagination)
|
{
|
return _iPaperTypeDAL.SelectModelPage(typeName,status,pagination);
|
}
|
|
/// <summary>
|
/// 根据主键返回纸张类别实体
|
/// </summary>
|
/// <param name="keyid">主键ID</param>
|
/// <returns>纸张类别实体</returns>
|
public Model.SysInquiry_PaperType SelectModelByKey(int keyid)
|
{
|
return _iPaperTypeDAL.SelectModelByKey(keyid);
|
}
|
|
/// <summary>
|
/// 判断是否有相同的纸张类别名称
|
/// </summary>
|
/// <param name="brandName"></param>
|
/// <returns></returns>
|
public bool IsExistsPaperTypeName(string typeName)
|
{
|
return _iPaperTypeDAL.IsExistsPaperTypeName(typeName);
|
}
|
|
|
/// <summary>
|
/// 返回所有有效的纸张列表
|
/// </summary>
|
/// <returns></returns>
|
public IEnumerable<SysInquiry_PaperType> GetPaperTypeList()
|
{
|
return _iPaperTypeDAL.GetPaperTypeList();
|
}
|
|
/// <summary>
|
/// 新增纸张类型
|
/// </summary>
|
/// <param name="model"></param>
|
/// <returns></returns>
|
public bool InsertPaperType(SysInquiry_PaperType model)
|
{
|
return _iPaperTypeDAL.InserModel(model);
|
}
|
|
/// <summary>
|
/// 修改纸张类别
|
/// </summary>
|
/// <param name="model"></param>
|
/// <returns></returns>
|
public bool UpdatePaperType(SysInquiry_PaperType model)
|
{
|
return _iPaperTypeDAL.UpdateModel(model);
|
}
|
|
/// <summary>
|
/// 获取最新排序顺序
|
/// </summary>
|
/// <returns></returns>
|
public int GetOrderNumByMax()
|
{
|
return _iPaperTypeDAL.GetOrderNumByMax();
|
}
|
}
|
}
|