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.
 
 
 
 
 
 

189 lines
5.0 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. /// 日 期:2023-03-06 12:18
  12. /// 描 述:心里预约功能
  13. /// </summary>
  14. public class PsychologyInfoBLL : PsychologyInfoIBLL
  15. {
  16. private PsychologyInfoService psychologyInfoService = new PsychologyInfoService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取列表数据
  20. /// </summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<PsychologyInfoEntity> GetList( string queryJson )
  24. {
  25. try
  26. {
  27. return psychologyInfoService.GetList(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="pagination">分页参数</param>
  45. /// <param name="queryJson">查询参数</param>
  46. /// <returns></returns>
  47. public IEnumerable<PsychologyInfoEntity> GetPageList(Pagination pagination, string queryJson)
  48. {
  49. try
  50. {
  51. return psychologyInfoService.GetPageList(pagination, queryJson);
  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="keyValue">主键</param>
  69. /// <returns></returns>
  70. public PsychologyInfoEntity GetEntity(string keyValue)
  71. {
  72. try
  73. {
  74. return psychologyInfoService.GetEntity(keyValue);
  75. }
  76. catch (Exception ex)
  77. {
  78. if (ex is ExceptionEx)
  79. {
  80. throw;
  81. }
  82. else
  83. {
  84. throw ExceptionEx.ThrowBusinessException(ex);
  85. }
  86. }
  87. }
  88. public PsychologyInfoEntity GetEntityForView(string keyValue)
  89. {
  90. try
  91. {
  92. return psychologyInfoService.GetEntityForView(keyValue);
  93. }
  94. catch (Exception ex)
  95. {
  96. if (ex is ExceptionEx)
  97. {
  98. throw;
  99. }
  100. else
  101. {
  102. throw ExceptionEx.ThrowBusinessException(ex);
  103. }
  104. }
  105. }
  106. #endregion
  107. #region 提交数据
  108. /// <summary>
  109. /// 删除实体数据
  110. /// </summary>
  111. /// <param name="keyValue">主键</param>
  112. public void DeleteEntity(string keyValue)
  113. {
  114. try
  115. {
  116. psychologyInfoService.DeleteEntity(keyValue);
  117. }
  118. catch (Exception ex)
  119. {
  120. if (ex is ExceptionEx)
  121. {
  122. throw;
  123. }
  124. else
  125. {
  126. throw ExceptionEx.ThrowBusinessException(ex);
  127. }
  128. }
  129. }
  130. /// <summary>
  131. /// 保存实体数据(新增、修改)
  132. /// </summary>
  133. /// <param name="keyValue">主键</param>
  134. /// <param name="entity">实体</param>
  135. public void SaveEntity(string keyValue, PsychologyInfoEntity entity)
  136. {
  137. try
  138. {
  139. psychologyInfoService.SaveEntity(keyValue, entity);
  140. }
  141. catch (Exception ex)
  142. {
  143. if (ex is ExceptionEx)
  144. {
  145. throw;
  146. }
  147. else
  148. {
  149. throw ExceptionEx.ThrowBusinessException(ex);
  150. }
  151. }
  152. }
  153. /// <summary>
  154. /// 提交实体数据
  155. /// </summary>
  156. /// <param name="keyValue">主键</param>
  157. public void SubmitEntity(string keyValue)
  158. {
  159. try
  160. {
  161. psychologyInfoService.SubmitEntity(keyValue);
  162. }
  163. catch (Exception ex)
  164. {
  165. if (ex is ExceptionEx)
  166. {
  167. throw;
  168. }
  169. else
  170. {
  171. throw ExceptionEx.ThrowBusinessException(ex);
  172. }
  173. }
  174. }
  175. #endregion
  176. }
  177. }