username@email.com
2025-05-14 99ddfbcecf0fa2881eb3a91028257eef87dab6de
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CY.IDAL;
using CY.Model;
using AbstractFactory;
using CY.IBaseDAL;
using CY.Infrastructure.DESEncrypt;
using CY.Infrastructure.Query;
namespace CY.BLL
{
    /// <summary>
    /// 授信规则的业务逻辑类
    /// </summary>
    public class Pay_CreditLineLevelRuleBLL
    {
        IPay_CreditLineLevelRuleDAL _IPay_CreditLineLevelRuleDal = null;
        /// <summary>
        /// 初始化构造
        /// </summary>
        public Pay_CreditLineLevelRuleBLL()
        {
            //获取Pay_CreditLineLevelRule DAL实现
            _IPay_CreditLineLevelRuleDal = Factory.GetDALByInterfaceName(DALInterface.IPay_CreditLineLevelRuleDAL) as IPay_CreditLineLevelRuleDAL;
        }
        /// <summary>
        /// 新增授信规则
        /// </summary>
        /// <param name="rType"></param>
        /// <returns></returns>
        public bool InsertModel(CY.Model.Pay_CreditLineLevelRule rType)
        {
            try
            {
                _IPay_CreditLineLevelRuleDal.InserModel(rType);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return true;
        }
        /// <summary>
        /// 修改授信规则
        /// </summary>
        /// <param name="rType"></param>
        /// <returns></returns>
        public bool UpdateModel(CY.Model.Pay_CreditLineLevelRule rType)
        {
            try
            {
                _IPay_CreditLineLevelRuleDal.UpdateModel(rType);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return true;
        }
 
        /// <summary>
        /// 删除授信规则
        /// </summary>
        /// <param name="rType"></param>
        /// <returns></returns>
        public bool DeleteModel(CY.Model.Pay_CreditLineLevelRule rType)
        {
            try
            {
                _IPay_CreditLineLevelRuleDal.DeleteModel(rType);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return true;
        }
 
        /// <summary>
        /// 查询规则分页列表
        /// </summary>
        /// <param name="pa"></param>
        /// <returns></returns>
        public IEnumerable<Pay_CreditLineLevelRule> GetModelPageList(Pagination pa)
        {
            Query query = new Query();
            IList<Criterion> criterias = new List<Criterion>()
            {
                new Criterion(""," "),
                new Criterion("orderBy","t.Keyid,Keyid"),
            };
            query.Criteria = criterias;
            return _IPay_CreditLineLevelRuleDal.SelectModelPage(query, pa); 
        }
 
        /// <summary>
        /// 获取全部规则
        /// </summary>
        /// <param name="Keyid">主键id</param>
        /// <returns></returns>
        public IEnumerable<Pay_CreditLineLevelRule> GetModelList()
        {
            Query query = new Query();
            return _IPay_CreditLineLevelRuleDal.SelectAllModel(query);
        }
 
        /// <summary>
        /// 获取单个规则
        /// </summary>
        /// <param name="Keyid">主键id</param>
        /// <returns></returns>
        public Pay_CreditLineLevelRule GetModel(int? Keyid)
        {
            Pay_CreditLineLevelRule result = null;
            try
            {
                result = _IPay_CreditLineLevelRuleDal.SelectModelByKeyid(Keyid) as Pay_CreditLineLevelRule;//执行查询
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return result;//返回结果
        }
 
        /// <summary>
        /// 获取单个规则名称
        /// </summary>
        /// <param name="Keyid">主键id</param>
        /// <returns></returns>
        public string GetModelName(int? Keyid)
        {
            Pay_CreditLineLevelRule result = null;
            try
            {
                result = _IPay_CreditLineLevelRuleDal.SelectModelByKeyid(Keyid) as Pay_CreditLineLevelRule;//执行查询
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return result==null?"":result.LevelName;//返回结果
        }
    }
}