CustomerBLL.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. using LeaRun.Application.Entity.CustomerManage;
  2. using LeaRun.Application.IService.CustomerManage;
  3. using LeaRun.Application.Service.CustomerManage;
  4. using LeaRun.Util.WebControl;
  5. using System.Collections.Generic;
  6. using System;
  7. namespace LeaRun.Application.Busines.CustomerManage
  8. {
  9. /// <summary>
  10. /// 版 本 6.1
  11. /// Copyright (c) 2013-2016 上海力软信息技术有限公司
  12. /// 创 建:佘赐雄
  13. /// 日 期:2016-03-14 09:47
  14. /// 描 述:客户信息
  15. /// </summary>
  16. public class CustomerBLL
  17. {
  18. private ICustomerService service = new CustomerService();
  19. #region 获取数据
  20. /// <summary>
  21. /// 获取列表
  22. /// </summary>
  23. /// <returns></returns>
  24. public IEnumerable<CustomerEntity> GetList()
  25. {
  26. return service.GetList();
  27. }
  28. /// <summary>
  29. /// 获取列表
  30. /// </summary>
  31. /// <param name="pagination">分页</param>
  32. /// <param name="queryJson">查询参数</param>
  33. /// <returns>返回分页列表</returns>
  34. public IEnumerable<CustomerEntity> GetPageList(Pagination pagination, string queryJson)
  35. {
  36. return service.GetPageList(pagination, queryJson);
  37. }
  38. /// <summary>
  39. /// 获取实体
  40. /// </summary>
  41. /// <param name="keyValue">主键值</param>
  42. /// <returns></returns>
  43. public CustomerEntity GetEntity(string keyValue)
  44. {
  45. return service.GetEntity(keyValue);
  46. }
  47. #endregion
  48. #region 验证数据
  49. /// <summary>
  50. /// 客户名称不能重复
  51. /// </summary>
  52. /// <param name="fullName">名称</param>
  53. /// <param name="keyValue">主键</param>
  54. /// <returns></returns>
  55. public bool ExistFullName(string fullName, string keyValue)
  56. {
  57. return service.ExistFullName(fullName, keyValue);
  58. }
  59. #endregion
  60. #region 提交数据
  61. /// <summary>
  62. /// 删除数据
  63. /// </summary>
  64. /// <param name="keyValue">主键</param>
  65. public void RemoveForm(string keyValue)
  66. {
  67. try
  68. {
  69. service.RemoveForm(keyValue);
  70. }
  71. catch (Exception)
  72. {
  73. throw;
  74. }
  75. }
  76. /// <summary>
  77. /// 保存表单(新增、修改)
  78. /// </summary>
  79. /// <param name="keyValue">主键值</param>
  80. /// <param name="entity">实体对象</param>
  81. /// <returns></returns>
  82. public void SaveForm(string keyValue, CustomerEntity entity)
  83. {
  84. try
  85. {
  86. service.SaveForm(keyValue, entity);
  87. }
  88. catch (Exception)
  89. {
  90. throw;
  91. }
  92. }
  93. /// <summary>
  94. /// 保存表单
  95. /// </summary>
  96. /// <param name="keyValue"></param>
  97. /// <param name="entity">实体</param>
  98. /// <param name="moduleId">模块</param>
  99. public void SaveForm(string keyValue, CustomerEntity entity, string moduleId)
  100. {
  101. try
  102. {
  103. service.SaveForm(keyValue, entity, moduleId);
  104. }
  105. catch (Exception)
  106. {
  107. throw;
  108. }
  109. }
  110. #endregion
  111. }
  112. }