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.
 
 
 
 
 
 

141 lines
3.9 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:47
  11. /// 描 述:开票信息
  12. /// </summary>
  13. public class CrmInvoiceBLL : CrmInvoiceIBLL
  14. {
  15. private CrmInvoiceService crmInvoiceService = new CrmInvoiceService();
  16. #region 获取数据
  17. /// <summary>
  18. /// 获取列表
  19. /// </summary>
  20. /// <param name="pagination">分页</param>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns>返回分页列表</returns>
  23. public IEnumerable<CrmInvoiceEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return crmInvoiceService.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<CrmInvoiceEntity> GetList(string queryJson)
  47. {
  48. try
  49. {
  50. return crmInvoiceService.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 CrmInvoiceEntity GetEntity(string keyValue)
  70. {
  71. try
  72. {
  73. return crmInvoiceService.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. crmInvoiceService.DeleteEntity(keyValue);
  98. }
  99. catch (Exception ex)
  100. {
  101. if (ex is ExceptionEx)
  102. {
  103. throw;
  104. }
  105. else
  106. {
  107. throw ExceptionEx.ThrowBusinessException(ex);
  108. }
  109. }
  110. }
  111. /// <summary>
  112. /// 保存表单(新增、修改)
  113. /// </summary>
  114. /// <param name="keyValue">主键值</param>
  115. /// <param name="entity">实体对象</param>
  116. /// <returns></returns>
  117. public void SaveEntity(string keyValue, CrmInvoiceEntity entity)
  118. {
  119. try
  120. {
  121. crmInvoiceService.SaveEntity(keyValue, entity);
  122. }
  123. catch (Exception ex)
  124. {
  125. if (ex is ExceptionEx)
  126. {
  127. throw;
  128. }
  129. else
  130. {
  131. throw ExceptionEx.ThrowBusinessException(ex);
  132. }
  133. }
  134. }
  135. #endregion
  136. }
  137. }