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.
 
 
 
 
 
 

202 lines
5.5 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.EducationalAdministration
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2021-09-27 10:33
  12. /// 描 述:学金类型
  13. /// </summary>
  14. public class ScholarshipBLL : ScholarshipIBLL
  15. {
  16. private ScholarshipService scholarshipService = new ScholarshipService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<ScholarshipEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return scholarshipService.GetPageList(pagination, queryJson);
  29. }
  30. catch (Exception ex)
  31. {
  32. if (ex is ExceptionEx)
  33. {
  34. throw;
  35. }
  36. else
  37. {
  38. throw ExceptionEx.ThrowBusinessException(ex);
  39. }
  40. }
  41. }
  42. /// <summary>
  43. /// 获取Scholarship表实体数据
  44. /// </summary>
  45. /// <param name="keyValue">主键</param>
  46. /// <returns></returns>
  47. public ScholarshipEntity GetScholarshipEntity(string keyValue)
  48. {
  49. try
  50. {
  51. return scholarshipService.GetScholarshipEntity(keyValue);
  52. }
  53. catch (Exception ex)
  54. {
  55. if (ex is ExceptionEx)
  56. {
  57. throw;
  58. }
  59. else
  60. {
  61. throw ExceptionEx.ThrowBusinessException(ex);
  62. }
  63. }
  64. }
  65. /// <summary>
  66. /// 获取页面显示列表数据
  67. /// </summary>
  68. /// <param name="pagination">查询参数</param>
  69. /// <param name="queryJson">查询参数</param>
  70. /// <returns></returns>
  71. public IEnumerable<ScholarshipEntity> GetList(string queryJson)
  72. {
  73. try
  74. {
  75. return scholarshipService.GetList(queryJson);
  76. }
  77. catch (Exception ex)
  78. {
  79. if (ex is ExceptionEx)
  80. {
  81. throw;
  82. }
  83. else
  84. {
  85. throw ExceptionEx.ThrowBusinessException(ex);
  86. }
  87. }
  88. }
  89. #endregion
  90. #region 提交数据
  91. /// <summary>
  92. /// 删除实体数据
  93. /// </summary>
  94. /// <param name="keyValue">主键</param>
  95. public void DeleteEntity(string keyValue)
  96. {
  97. try
  98. {
  99. scholarshipService.DeleteEntity(keyValue);
  100. }
  101. catch (Exception ex)
  102. {
  103. if (ex is ExceptionEx)
  104. {
  105. throw;
  106. }
  107. else
  108. {
  109. throw ExceptionEx.ThrowBusinessException(ex);
  110. }
  111. }
  112. }
  113. /// <summary>
  114. /// 保存实体数据(新增、修改)
  115. /// </summary>
  116. /// <param name="keyValue">主键</param>
  117. /// <param name="entity">实体</param>
  118. /// <returns></returns>
  119. public void SaveEntity(string keyValue, ScholarshipEntity entity)
  120. {
  121. try
  122. {
  123. scholarshipService.SaveEntity(keyValue, entity);
  124. }
  125. catch (Exception ex)
  126. {
  127. if (ex is ExceptionEx)
  128. {
  129. throw;
  130. }
  131. else
  132. {
  133. throw ExceptionEx.ThrowBusinessException(ex);
  134. }
  135. }
  136. }
  137. #endregion
  138. #region 扩展数据
  139. /// <summary>
  140. /// 获取CdLessonSort表实体数据
  141. /// <param name="lessonSortNo">分类编号</param>
  142. /// <summary>
  143. /// <returns></returns>
  144. public ScholarshipEntity NameOrCode(string ItemName ,string ItemCode,int? IsType)
  145. {
  146. try
  147. {
  148. return scholarshipService.NameOrCode(ItemName,ItemCode,IsType);
  149. }
  150. catch (Exception ex)
  151. {
  152. if (ex is ExceptionEx)
  153. {
  154. throw;
  155. }
  156. else
  157. {
  158. throw ExceptionEx.ThrowBusinessException(ex);
  159. }
  160. }
  161. }
  162. #endregion
  163. #region 启用和禁用
  164. /// <summary>
  165. /// 注册 and 取消注册
  166. /// </summary>
  167. /// <param name="keyValue">主键</param>
  168. /// <param name="entity">实体</param>
  169. public void EnableDisable(string keyValue, string status)
  170. {
  171. try
  172. {
  173. scholarshipService.EnableDisable(keyValue, status);
  174. }
  175. catch (Exception ex)
  176. {
  177. if (ex is ExceptionEx)
  178. {
  179. throw;
  180. }
  181. else
  182. {
  183. throw ExceptionEx.ThrowBusinessException(ex);
  184. }
  185. }
  186. }
  187. #endregion
  188. }
  189. }