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
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;
using System.Data;
 
namespace CY.BLL.OA
{
  public    class OA_SuppliersBLL
    {
      IOA_SuppliersDAL suppliersDAL = null;
      public OA_SuppliersBLL()
      {
          suppliersDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_SuppliersDAL) as IOA_SuppliersDAL;
      
      }
      /// <summary>
      /// 添加一个供应商
      /// </summary>
      /// <param name="model"></param>
      /// <returns></returns>
      public bool InsertModel(OA_Suppliers model)
      {
          return suppliersDAL.InserModel(model);
      
      }
      /// <summary>
      /// 更新供应商
      /// </summary>
      /// <param name="model"></param>
      /// <returns></returns>
      public bool UpdateModel(OA_Suppliers model)
      {
          return suppliersDAL.UpdateModel(model);
      }
      /// <summary>
      /// 删除一个供应商
      /// </summary>
      /// <param name="model"></param>
      /// <returns></returns>
      public bool DeleteModel(OA_Suppliers model)
      {
          return suppliersDAL.DeleteModel(model);
      }
 
      /// <summary>
      /// 根据条件获取全部供应商
      /// </summary>
      /// <param name="pa"></param>
      /// <param name="FirmId"></param>
      /// <param name="CooperativeStateId"></param>
      /// <param name="SuppliersLevelId"></param>
      /// <param name="SuppliersTypeId"></param>
      /// <returns></returns>
      public IEnumerable<Model.OA_Suppliers> getAllSuppliers(Pagination pa, Guid FirmId, string CooperativeStateId, string SuppliersLevelId, string SuppliersTypeId, string SuppliersName, string BusinessScope)
      {
 
          return suppliersDAL.getAllSuppliers(pa, FirmId, CooperativeStateId, SuppliersLevelId, SuppliersTypeId, SuppliersName, BusinessScope);
      }
      /// <summary>
      /// 得到单个供应商
      /// </summary>
      /// <param name="Keyid"></param>
      /// <returns></returns>
      public OA_Suppliers getSingleSupplier(string Keyid)
      {
 
          return suppliersDAL.getSingleSupplier(Keyid);
      }
 
      /// <summary>
      /// 获取table类型的所有供应商
      /// </summary>
      /// <param name="FirmId"></param>
      /// <returns></returns>
    public  DataTable getSupplierTable(Guid FirmId)
      {
          return suppliersDAL.getSupplierTable(FirmId);
      }
 
        /// <summary>
        /// 获取table类型的所有供应商
        /// </summary>
        /// <param name="FirmId"></param>
        /// <returns></returns>
        public IEnumerable<Model.OA_Suppliers> getSupplierByFirmId(Guid FirmId,string Name)
        {
            return suppliersDAL.getSupplierByFirmId(FirmId, Name);
        }
 
    }
}