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.
 
 
 
 
 
 

275 lines
7.1 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 LessonInfoEntity GetLessonInfoAndTypeByLessonNo(string lessonNo)
  106. {
  107. try
  108. {
  109. return lessonInfoService.GetLessonInfoAndTypeByLessonNo(lessonNo);
  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. public bool GetAny()
  124. {
  125. try
  126. {
  127. return lessonInfoService.GetAny();
  128. }
  129. catch (Exception ex)
  130. {
  131. if (ex is ExceptionEx)
  132. {
  133. throw;
  134. }
  135. else
  136. {
  137. throw ExceptionEx.ThrowBusinessException(ex);
  138. }
  139. }
  140. }
  141. #endregion
  142. #region 提交数据
  143. public void Lock(string keyValue)
  144. {
  145. try
  146. {
  147. lessonInfoService.Lock(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. public void UnLock(string keyValue)
  162. {
  163. try
  164. {
  165. lessonInfoService.UnLock(keyValue);
  166. }
  167. catch (Exception ex)
  168. {
  169. if (ex is ExceptionEx)
  170. {
  171. throw;
  172. }
  173. else
  174. {
  175. throw ExceptionEx.ThrowBusinessException(ex);
  176. }
  177. }
  178. }
  179. /// <summary>
  180. /// 删除实体数据
  181. /// <param name="keyValue">主键</param>
  182. /// <summary>
  183. /// <returns></returns>
  184. public void DeleteEntity(string keyValue)
  185. {
  186. try
  187. {
  188. lessonInfoService.DeleteEntity(keyValue);
  189. }
  190. catch (Exception ex)
  191. {
  192. if (ex is ExceptionEx)
  193. {
  194. throw;
  195. }
  196. else
  197. {
  198. throw ExceptionEx.ThrowBusinessException(ex);
  199. }
  200. }
  201. }
  202. /// <summary>
  203. /// 保存实体数据(新增、修改)
  204. /// <param name="keyValue">主键</param>
  205. /// <summary>
  206. /// <returns></returns>
  207. public void SaveEntity(string keyValue, LessonInfoEntity entity)
  208. {
  209. try
  210. {
  211. lessonInfoService.SaveEntity(keyValue, entity);
  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> GetAllLesson()
  226. {
  227. try
  228. {
  229. return lessonInfoService.GetAllLesson();
  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. public IEnumerable<LessonInfoEntity> GetAllList()
  244. {
  245. try
  246. {
  247. return lessonInfoService.GetAllList();
  248. }
  249. catch (Exception ex)
  250. {
  251. if (ex is ExceptionEx)
  252. {
  253. throw;
  254. }
  255. else
  256. {
  257. throw ExceptionEx.ThrowBusinessException(ex);
  258. }
  259. }
  260. }
  261. #endregion
  262. }
  263. }