You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

140 lines
3.8 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Learun.Application.CRM
  5. {
  6. /// <summary>
  7. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  8. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  9. /// 创 建:超级管理员
  10. /// 日 期:2017-07-11 14:28
  11. /// 描 述:费用支出
  12. /// </summary>
  13. public class CrmExpensesBLL : CrmExpensesIBLL
  14. {
  15. CrmExpensesService crmExpensesService = new CrmExpensesService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取列表
  19. /// </summary>
  20. /// <param name="pagination">分页</param>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns>返回分页列表</returns>
  23. public IEnumerable<CrmExpensesEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return crmExpensesService.GetPageList(pagination, queryJson);
  28. }
  29. catch (Exception ex)
  30. {
  31. if (ex is ExceptionEx)
  32. {
  33. throw;
  34. }
  35. else
  36. {
  37. throw ExceptionEx.ThrowBusinessException(ex);
  38. }
  39. }
  40. }
  41. /// <summary>
  42. /// 获取列表
  43. /// </summary>
  44. /// <param name="queryJson">查询参数</param>
  45. /// <returns>返回列表</returns>
  46. public IEnumerable<CrmExpensesEntity> GetList(string queryJson)
  47. {
  48. try
  49. {
  50. return crmExpensesService.GetList(queryJson);
  51. }
  52. catch (Exception ex)
  53. {
  54. if (ex is ExceptionEx)
  55. {
  56. throw;
  57. }
  58. else
  59. {
  60. throw ExceptionEx.ThrowBusinessException(ex);
  61. }
  62. }
  63. }
  64. /// <summary>
  65. /// 获取实体
  66. /// </summary>
  67. /// <param name="keyValue">主键值</param>
  68. /// <returns></returns>
  69. public CrmExpensesEntity GetEntity(string keyValue)
  70. {
  71. try
  72. {
  73. return crmExpensesService.GetEntity(keyValue);
  74. }
  75. catch (Exception ex)
  76. {
  77. if (ex is ExceptionEx)
  78. {
  79. throw;
  80. }
  81. else
  82. {
  83. throw ExceptionEx.ThrowBusinessException(ex);
  84. }
  85. }
  86. }
  87. #endregion
  88. #region 提交数据
  89. /// <summary>
  90. /// 删除数据
  91. /// </summary>
  92. /// <param name="keyValue">主键</param>
  93. public void DeleteEntity(string keyValue)
  94. {
  95. try
  96. {
  97. crmExpensesService.DeleteEntity(keyValue);
  98. }
  99. catch (Exception ex)
  100. {
  101. if (ex is ExceptionEx)
  102. {
  103. throw;
  104. }
  105. else
  106. {
  107. throw ExceptionEx.ThrowServiceException(ex);
  108. }
  109. }
  110. }
  111. /// <summary>
  112. /// 保存表单(新增)
  113. /// </summary>
  114. /// <param name="entity">实体对象</param>
  115. /// <returns></returns>
  116. public void SaveEntity(CrmExpensesEntity entity)
  117. {
  118. try
  119. {
  120. crmExpensesService.SaveEntity(entity);
  121. }
  122. catch (Exception ex)
  123. {
  124. if (ex is ExceptionEx)
  125. {
  126. throw;
  127. }
  128. else
  129. {
  130. throw ExceptionEx.ThrowServiceException(ex);
  131. }
  132. }
  133. }
  134. #endregion
  135. }
  136. }