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.

ClassPlanBLL.cs 6.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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-08-21 17:28
  12. /// 描 述:成绩比例设置
  13. /// </summary>
  14. public class ClassPlanBLL : ClassPlanIBLL
  15. {
  16. private ClassPlanService classPlanService = new ClassPlanService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<OpenLessonPlanEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return classPlanService.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. /// 获取OpenLessonPlan表实体数据
  44. /// </summary>
  45. /// <param name="keyValue">主键</param>
  46. /// <returns></returns>
  47. public OpenLessonPlanEntity GetClassPlanEntity(string keyValue)
  48. {
  49. try
  50. {
  51. return classPlanService.GetClassPlanEntity(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. #endregion
  66. #region 提交数据
  67. /// <summary>
  68. /// 删除实体数据
  69. /// </summary>
  70. /// <param name="keyValue">主键</param>
  71. public void DeleteEntity(string keyValue)
  72. {
  73. try
  74. {
  75. classPlanService.DeleteEntity(keyValue);
  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. /// <summary>
  90. /// 保存实体数据(新增、修改)
  91. /// </summary>
  92. /// <param name="keyValue">主键</param>
  93. /// <param name="entity">实体</param>
  94. /// <returns></returns>
  95. public void SaveEntity(string keyValue, OpenLessonPlanEntity entity)
  96. {
  97. try
  98. {
  99. classPlanService.SaveEntity(keyValue, entity);
  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. #endregion
  114. #region 扩展数据
  115. /// <summary>
  116. /// 去重
  117. /// </summary>
  118. /// <param name="School"></param>
  119. /// <param name="Year"></param>
  120. /// <param name="Semester"></param>
  121. /// <param name="Dept"></param>
  122. /// <param name="Major"></param>
  123. /// <param name="Grade"></param>
  124. /// <param name="Lesson"></param>
  125. /// <returns></returns>
  126. public OpenLessonPlanEntity GetRepetitions(string School, string Year, string Semester, string Dept,
  127. string Major, string Grade, string Lesson)
  128. {
  129. try
  130. {
  131. return classPlanService.GetRepetitions(School, Year, Semester, Dept, Major, Grade, Lesson);
  132. }
  133. catch (Exception ex)
  134. {
  135. if (ex is ExceptionEx)
  136. {
  137. throw;
  138. }
  139. else
  140. {
  141. throw ExceptionEx.ThrowBusinessException(ex);
  142. }
  143. }
  144. }
  145. /// <summary>
  146. /// 删除实体数据
  147. /// </summary>
  148. /// <param name="keyValue">主键</param>
  149. public void DelRelation(string keyValue)
  150. {
  151. try
  152. {
  153. classPlanService.DeleteEntity(keyValue);
  154. }
  155. catch (Exception ex)
  156. {
  157. if (ex is ExceptionEx)
  158. {
  159. throw;
  160. }
  161. else
  162. {
  163. throw ExceptionEx.ThrowBusinessException(ex);
  164. }
  165. }
  166. }
  167. /// <summary>
  168. /// 保存实体数据(新增、修改)
  169. /// <param name="keyValue">主键</param>
  170. /// <summary>
  171. /// <returns></returns>
  172. public List<OpenLessonPlanEntity> GetListById(string keyValue)
  173. {
  174. try
  175. {
  176. return classPlanService.GetListById(keyValue);
  177. }
  178. catch (Exception ex)
  179. {
  180. if (ex is ExceptionEx)
  181. {
  182. throw;
  183. }
  184. else
  185. {
  186. throw ExceptionEx.ThrowBusinessException(ex);
  187. }
  188. }
  189. }
  190. public void SaveEntityList(string keyValue, List<OpenLessonPlanEntity> entity)
  191. {
  192. try
  193. {
  194. classPlanService.SaveEntityList(keyValue, entity);
  195. }
  196. catch (Exception ex)
  197. {
  198. if (ex is ExceptionEx)
  199. {
  200. throw;
  201. }
  202. else
  203. {
  204. throw ExceptionEx.ThrowBusinessException(ex);
  205. }
  206. }
  207. }
  208. #endregion
  209. }
  210. }