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.
 
 
 
 
 
 

237 lines
6.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. /// <summary>
  42. /// 获取LessonInfo表实体数据
  43. /// <param name="keyValue">主键</param>
  44. /// <summary>
  45. /// <returns></returns>
  46. public LessonInfoEntity GetLessonInfoEntity(string keyValue)
  47. {
  48. try
  49. {
  50. return lessonInfoService.GetLessonInfoEntity(keyValue);
  51. }
  52. catch (Exception ex)
  53. {
  54. if (ex is ExceptionEx)
  55. {
  56. throw;
  57. }
  58. else
  59. {
  60. throw ExceptionEx.ThrowBusinessException(ex);
  61. }
  62. }
  63. }
  64. /// <summary>
  65. /// 获取LessonInfo表实体数据
  66. /// <param name="keyValue">主键</param>
  67. /// <summary>
  68. /// <returns></returns>
  69. public LessonInfoEntity GetLessonInfoEntityByLessonNo(string lessonNo)
  70. {
  71. try
  72. {
  73. return lessonInfoService.GetLessonInfoEntityByLessonNo(lessonNo);
  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. public bool GetAny()
  88. {
  89. try
  90. {
  91. return lessonInfoService.GetAny();
  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. #endregion
  106. #region 提交数据
  107. public void Lock(string keyValue)
  108. {
  109. try
  110. {
  111. lessonInfoService.Lock(keyValue);
  112. }
  113. catch (Exception ex)
  114. {
  115. if (ex is ExceptionEx)
  116. {
  117. throw;
  118. }
  119. else
  120. {
  121. throw ExceptionEx.ThrowBusinessException(ex);
  122. }
  123. }
  124. }
  125. public void UnLock(string keyValue)
  126. {
  127. try
  128. {
  129. lessonInfoService.UnLock(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. /// <summary>
  144. /// 删除实体数据
  145. /// <param name="keyValue">主键</param>
  146. /// <summary>
  147. /// <returns></returns>
  148. public void DeleteEntity(string keyValue)
  149. {
  150. try
  151. {
  152. lessonInfoService.DeleteEntity(keyValue);
  153. }
  154. catch (Exception ex)
  155. {
  156. if (ex is ExceptionEx)
  157. {
  158. throw;
  159. }
  160. else
  161. {
  162. throw ExceptionEx.ThrowBusinessException(ex);
  163. }
  164. }
  165. }
  166. /// <summary>
  167. /// 保存实体数据(新增、修改)
  168. /// <param name="keyValue">主键</param>
  169. /// <summary>
  170. /// <returns></returns>
  171. public void SaveEntity(string keyValue, LessonInfoEntity entity)
  172. {
  173. try
  174. {
  175. lessonInfoService.SaveEntity(keyValue, entity);
  176. }
  177. catch (Exception ex)
  178. {
  179. if (ex is ExceptionEx)
  180. {
  181. throw;
  182. }
  183. else
  184. {
  185. throw ExceptionEx.ThrowBusinessException(ex);
  186. }
  187. }
  188. }
  189. public IEnumerable<LessonInfoEntity> GetAllLesson()
  190. {
  191. try
  192. {
  193. return lessonInfoService.GetAllLesson();
  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> GetAllList()
  208. {
  209. try
  210. {
  211. return lessonInfoService.GetAllList();
  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. #endregion
  226. }
  227. }