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.
 
 
 
 
 
 

263 lines
6.8 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-29 11:08
  12. /// 描 述:班级信息管理
  13. /// </summary>
  14. public class ClassInfoBLL : ClassInfoIBLL
  15. {
  16. private ClassInfoService classInfoService = new ClassInfoService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<ClassInfoEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return classInfoService.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 bool GetAny()
  42. {
  43. try
  44. {
  45. return classInfoService.GetAny();
  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. /// 获取ClassInfo表实体数据
  61. /// <param name="keyValue">主键</param>
  62. /// <summary>
  63. /// <returns></returns>
  64. public ClassInfoEntity GetClassInfoEntity(string keyValue)
  65. {
  66. try
  67. {
  68. return classInfoService.GetClassInfoEntity(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. /// 获取ClassInfo表实体数据
  84. /// <param name="classNo">班级编号</param>
  85. /// <summary>
  86. /// <returns></returns>
  87. public ClassInfoEntity GetClassInfoEntityByClassNo(string classNo)
  88. {
  89. try
  90. {
  91. return classInfoService.GetClassInfoEntityByClassNo(classNo);
  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. /// <summary>
  106. /// 获取ClassInfo表实体数据
  107. /// <param name="className">班级名称</param>
  108. /// <summary>
  109. /// <returns></returns>
  110. public ClassInfoEntity GetClassInfoEntityByClassName(string className)
  111. {
  112. try
  113. {
  114. return classInfoService.GetClassInfoEntityByClassName(className);
  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. public void Lock(string keyValue)
  131. {
  132. try
  133. {
  134. classInfoService.Lock(keyValue);
  135. }
  136. catch (Exception ex)
  137. {
  138. if (ex is ExceptionEx)
  139. {
  140. throw;
  141. }
  142. else
  143. {
  144. throw ExceptionEx.ThrowBusinessException(ex);
  145. }
  146. }
  147. }
  148. public void UnLock(string keyValue)
  149. {
  150. try
  151. {
  152. classInfoService.UnLock(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 DeleteEntity(string keyValue)
  172. {
  173. try
  174. {
  175. classInfoService.DeleteEntity(keyValue);
  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. /// <summary>
  190. /// 保存实体数据(新增、修改)
  191. /// <param name="keyValue">主键</param>
  192. /// <summary>
  193. /// <returns></returns>
  194. public void SaveEntity(string keyValue, ClassInfoEntity entity)
  195. {
  196. try
  197. {
  198. classInfoService.SaveEntity(keyValue, entity);
  199. }
  200. catch (Exception ex)
  201. {
  202. if (ex is ExceptionEx)
  203. {
  204. throw;
  205. }
  206. else
  207. {
  208. throw ExceptionEx.ThrowBusinessException(ex);
  209. }
  210. }
  211. }
  212. public IEnumerable<ClassInfoEntity> GetAllClass()
  213. {
  214. try
  215. {
  216. return classInfoService.GetAllClass();
  217. }
  218. catch (Exception ex)
  219. {
  220. if (ex is ExceptionEx)
  221. {
  222. throw;
  223. }
  224. else
  225. {
  226. throw ExceptionEx.ThrowBusinessException(ex);
  227. }
  228. }
  229. }
  230. public IEnumerable<ClassInfoEntity> GetClassByMajorNo(string MajorNo)
  231. {
  232. try
  233. {
  234. return classInfoService.GetClassByMajorNo(MajorNo);
  235. }
  236. catch (Exception ex)
  237. {
  238. if (ex is ExceptionEx)
  239. {
  240. throw;
  241. }
  242. else
  243. {
  244. throw ExceptionEx.ThrowBusinessException(ex);
  245. }
  246. }
  247. }
  248. #endregion
  249. }
  250. }