1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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();
        }
    }
}