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.

SchoolCalendarBLL.cs 5.2 KiB

4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2019-07-03 14:31
  12. /// 描 述:校历管理
  13. /// </summary>
  14. public class SchoolCalendarBLL : SchoolCalendarIBLL
  15. {
  16. private SchoolCalendarService schoolCalendarService = new SchoolCalendarService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表分页数据
  20. /// <summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<SchoolCalendarEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return schoolCalendarService.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. /// 获取页面显示列表数据
  44. /// <summary>
  45. /// <param name="queryJson">查询参数</param>
  46. /// <returns></returns>
  47. public IEnumerable<SchoolCalendarEntity> GetList(string queryJson)
  48. {
  49. try
  50. {
  51. return schoolCalendarService.GetList(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. /// <returns>返回列表</returns>
  69. public IEnumerable<SchoolCalendarEntity> GetList()
  70. {
  71. try
  72. {
  73. return schoolCalendarService.GetList();
  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. /// <summary>
  88. /// 获取SchoolCalendar表实体数据
  89. /// <param name="keyValue">主键</param>
  90. /// <summary>
  91. /// <returns></returns>
  92. public SchoolCalendarEntity GetSchoolCalendarEntity(string keyValue)
  93. {
  94. try
  95. {
  96. return schoolCalendarService.GetSchoolCalendarEntity(keyValue);
  97. }
  98. catch (Exception ex)
  99. {
  100. if (ex is ExceptionEx)
  101. {
  102. throw;
  103. }
  104. else
  105. {
  106. throw ExceptionEx.ThrowBusinessException(ex);
  107. }
  108. }
  109. }
  110. public SchoolCalendarEntity GetSchoolCalendarEntityByNo(string academicYearNo,string semester)
  111. {
  112. try
  113. {
  114. return schoolCalendarService.GetSchoolCalendarEntityByNo(academicYearNo, semester);
  115. }
  116. catch (Exception ex)
  117. {
  118. if (ex is ExceptionEx)
  119. {
  120. throw;
  121. }
  122. else
  123. {
  124. throw ExceptionEx.ThrowBusinessException(ex);
  125. }
  126. }
  127. }
  128. #endregion
  129. #region 提交数据
  130. /// <summary>
  131. /// 删除实体数据
  132. /// <param name="keyValue">主键</param>
  133. /// <summary>
  134. /// <returns></returns>
  135. public void DeleteEntity(string keyValue)
  136. {
  137. try
  138. {
  139. schoolCalendarService.DeleteEntity(keyValue);
  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. /// <param name="keyValue">主键</param>
  156. /// <summary>
  157. /// <returns></returns>
  158. public void SaveEntity(UserInfo userInfo, string keyValue, SchoolCalendarEntity entity)
  159. {
  160. try
  161. {
  162. schoolCalendarService.SaveEntity(userInfo, keyValue, entity);
  163. }
  164. catch (Exception ex)
  165. {
  166. if (ex is ExceptionEx)
  167. {
  168. throw;
  169. }
  170. else
  171. {
  172. throw ExceptionEx.ThrowBusinessException(ex);
  173. }
  174. }
  175. }
  176. #endregion
  177. }
  178. }