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
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.OA
{
    public class OA_CustomerApplyBLL
    {
        IOA_CustomerApplyDAL idal_IOA_CustomerApplyDAL = null;
 
        public OA_CustomerApplyBLL()
        {
            idal_IOA_CustomerApplyDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_CustomerApplyDAL) as IOA_CustomerApplyDAL;
        }
 
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool InsertModel(Model.OA_CustomerApply model)
        {
            return idal_IOA_CustomerApplyDAL.InserModel(model);
        }
 
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateModel(Model.OA_CustomerApply model)
        {
 
            return idal_IOA_CustomerApplyDAL.UpdateModel(model);
        }
 
        /// <summary>
        /// 回复客户转换申请
        /// </summary>
        /// <param name="keyid"></param>
        /// <param name="CustomId"></param>
        /// <param name="MemberId"></param>
        /// <param name="Status"></param>
        /// <returns></returns>
        public bool UpdateModel(int? Keyid, Guid CustomId, Guid MemberId, string Status)
        {
            return idal_IOA_CustomerApplyDAL.UpdateModel(Keyid, CustomId, MemberId, Status);
        }
 
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool DeleteModel(Model.OA_CustomerApply model)
        {
 
            return idal_IOA_CustomerApplyDAL.DeleteModel(model);
        }
 
        /// <summary>
        /// 根据编号获得信息
        /// </summary>
        /// <param name="Keyid">编号</param>
        /// <returns></returns>
        public OA_CustomerApply GetModelByKeyid(int? Keyid)
        {
            return idal_IOA_CustomerApplyDAL.GetModelByKeyid(Keyid);
        }
 
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="pagination"></param>
        /// <param name="MemberId"></param>
        /// <returns></returns>
        public IEnumerable<Model.OA_CustomerApply> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId)
        {
            return idal_IOA_CustomerApplyDAL.SelectModelPage(pagination,MemberId);
        }
 
        /// <summary>
        /// 根据客户编号判断申请是否正常
        /// </summary>
        /// <param name="CustomId"></param>
        /// <returns></returns>
        public int IsAlreadyApplication(Guid CustomId)
        {
            return idal_IOA_CustomerApplyDAL.IsAlreadyApplication(CustomId);
        }
    }
}