Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

256 linhas
6.6 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-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 数字化校园
  10. /// 创 建:超级管理员
  11. /// 日 期:2019-01-24 17:03
  12. /// 描 述:课程信息管理
  13. /// </summary>
  14. public class LessonInfoBLL : LessonInfoIBLL
  15. {
  16. private LessonInfoService lessonInfoService = new LessonInfoService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<LessonInfoEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return lessonInfoService.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. public IEnumerable<LessonInfoEntity> GetLessonByMajorNo(string majorNo)
  42. {
  43. try
  44. {
  45. return lessonInfoService.GetLessonByMajorNo(majorNo);
  46. }
  47. catch (Exception ex)
  48. {
  49. if (ex is ExceptionEx)
  50. {
  51. throw;
  52. }
  53. else
  54. {
  55. throw ExceptionEx.ThrowBusinessException(ex);
  56. }
  57. }
  58. }
  59. /// <summary>
  60. /// 获取LessonInfo表实体数据
  61. /// <param name="keyValue">主键</param>
  62. /// <summary>
  63. /// <returns></returns>
  64. public LessonInfoEntity GetLessonInfoEntity(string keyValue)
  65. {
  66. try
  67. {
  68. return lessonInfoService.GetLessonInfoEntity(keyValue);
  69. }
  70. catch (Exception ex)
  71. {
  72. if (ex is ExceptionEx)
  73. {
  74. throw;
  75. }
  76. else
  77. {
  78. throw ExceptionEx.ThrowBusinessException(ex);
  79. }
  80. }
  81. }
  82. /// <summary>
  83. /// 获取LessonInfo表实体数据
  84. /// <param name="keyValue">主键</param>
  85. /// <summary>
  86. /// <returns></returns>
  87. public LessonInfoEntity GetLessonInfoEntityByLessonNo(string lessonNo)
  88. {
  89. try
  90. {
  91. return lessonInfoService.GetLessonInfoEntityByLessonNo(lessonNo);
  92. }
  93. catch (Exception ex)
  94. {
  95. if (ex is ExceptionEx)
  96. {
  97. throw;
  98. }
  99. else
  100. {
  101. throw ExceptionEx.ThrowBusinessException(ex);
  102. }
  103. }
  104. }
  105. public bool GetAny()
  106. {
  107. try
  108. {
  109. return lessonInfoService.GetAny();
  110. }
  111. catch (Exception ex)
  112. {
  113. if (ex is ExceptionEx)
  114. {
  115. throw;
  116. }
  117. else
  118. {
  119. throw ExceptionEx.ThrowBusinessException(ex);
  120. }
  121. }
  122. }
  123. #endregion
  124. #region 提交数据
  125. public void Lock(string keyValue)
  126. {
  127. try
  128. {
  129. lessonInfoService.Lock(keyValue);
  130. }
  131. catch (Exception ex)
  132. {
  133. if (ex is ExceptionEx)
  134. {
  135. throw;
  136. }
  137. else
  138. {
  139. throw ExceptionEx.ThrowBusinessException(ex);
  140. }
  141. }
  142. }
  143. public void UnLock(string keyValue)
  144. {
  145. try
  146. {
  147. lessonInfoService.UnLock(keyValue);
  148. }
  149. catch (Exception ex)
  150. {
  151. if (ex is ExceptionEx)
  152. {
  153. throw;
  154. }
  155. else
  156. {
  157. throw ExceptionEx.ThrowBusinessException(ex);
  158. }
  159. }
  160. }
  161. /// <summary>
  162. /// 删除实体数据
  163. /// <param name="keyValue">主键</param>
  164. /// <summary>
  165. /// <returns></returns>
  166. public void DeleteEntity(string keyValue)
  167. {
  168. try
  169. {
  170. lessonInfoService.DeleteEntity(keyValue);
  171. }
  172. catch (Exception ex)
  173. {
  174. if (ex is ExceptionEx)
  175. {
  176. throw;
  177. }
  178. else
  179. {
  180. throw ExceptionEx.ThrowBusinessException(ex);
  181. }
  182. }
  183. }
  184. /// <summary>
  185. /// 保存实体数据(新增、修改)
  186. /// <param name="keyValue">主键</param>
  187. /// <summary>
  188. /// <returns></returns>
  189. public void SaveEntity(string keyValue, LessonInfoEntity entity)
  190. {
  191. try
  192. {
  193. lessonInfoService.SaveEntity(keyValue, entity);
  194. }
  195. catch (Exception ex)
  196. {
  197. if (ex is ExceptionEx)
  198. {
  199. throw;
  200. }
  201. else
  202. {
  203. throw ExceptionEx.ThrowBusinessException(ex);
  204. }
  205. }
  206. }
  207. public IEnumerable<LessonInfoEntity> GetAllLesson()
  208. {
  209. try
  210. {
  211. return lessonInfoService.GetAllLesson();
  212. }
  213. catch (Exception ex)
  214. {
  215. if (ex is ExceptionEx)
  216. {
  217. throw;
  218. }
  219. else
  220. {
  221. throw ExceptionEx.ThrowBusinessException(ex);
  222. }
  223. }
  224. }
  225. public IEnumerable<LessonInfoEntity> GetAllList()
  226. {
  227. try
  228. {
  229. return lessonInfoService.GetAllList();
  230. }
  231. catch (Exception ex)
  232. {
  233. if (ex is ExceptionEx)
  234. {
  235. throw;
  236. }
  237. else
  238. {
  239. throw ExceptionEx.ThrowBusinessException(ex);
  240. }
  241. }
  242. }
  243. #endregion
  244. }
  245. }