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.
 
 
 
 
 
 

285 lines
7.4 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. /// <summary>
  129. /// 获取学校Id (根据班级编号)
  130. /// </summary>
  131. /// <param name="classNo"></param>
  132. /// <returns></returns>
  133. public string GetSchoolIdByClassNo(string classNo) {
  134. try
  135. {
  136. return classInfoService.GetSchoolIdByClassNo(classNo);
  137. }
  138. catch (Exception ex)
  139. {
  140. if (ex is ExceptionEx)
  141. {
  142. throw;
  143. }
  144. else
  145. {
  146. throw ExceptionEx.ThrowBusinessException(ex);
  147. }
  148. }
  149. }
  150. #endregion
  151. #region 提交数据
  152. public void Lock(string keyValue)
  153. {
  154. try
  155. {
  156. classInfoService.Lock(keyValue);
  157. }
  158. catch (Exception ex)
  159. {
  160. if (ex is ExceptionEx)
  161. {
  162. throw;
  163. }
  164. else
  165. {
  166. throw ExceptionEx.ThrowBusinessException(ex);
  167. }
  168. }
  169. }
  170. public void UnLock(string keyValue)
  171. {
  172. try
  173. {
  174. classInfoService.UnLock(keyValue);
  175. }
  176. catch (Exception ex)
  177. {
  178. if (ex is ExceptionEx)
  179. {
  180. throw;
  181. }
  182. else
  183. {
  184. throw ExceptionEx.ThrowBusinessException(ex);
  185. }
  186. }
  187. }
  188. /// <summary>
  189. /// 删除实体数据
  190. /// <param name="keyValue">主键</param>
  191. /// <summary>
  192. /// <returns></returns>
  193. public void DeleteEntity(string keyValue)
  194. {
  195. try
  196. {
  197. classInfoService.DeleteEntity(keyValue);
  198. }
  199. catch (Exception ex)
  200. {
  201. if (ex is ExceptionEx)
  202. {
  203. throw;
  204. }
  205. else
  206. {
  207. throw ExceptionEx.ThrowBusinessException(ex);
  208. }
  209. }
  210. }
  211. /// <summary>
  212. /// 保存实体数据(新增、修改)
  213. /// <param name="keyValue">主键</param>
  214. /// <summary>
  215. /// <returns></returns>
  216. public void SaveEntity(string keyValue, ClassInfoEntity entity)
  217. {
  218. try
  219. {
  220. classInfoService.SaveEntity(keyValue, entity);
  221. }
  222. catch (Exception ex)
  223. {
  224. if (ex is ExceptionEx)
  225. {
  226. throw;
  227. }
  228. else
  229. {
  230. throw ExceptionEx.ThrowBusinessException(ex);
  231. }
  232. }
  233. }
  234. public IEnumerable<ClassInfoEntity> GetAllClass()
  235. {
  236. try
  237. {
  238. return classInfoService.GetAllClass();
  239. }
  240. catch (Exception ex)
  241. {
  242. if (ex is ExceptionEx)
  243. {
  244. throw;
  245. }
  246. else
  247. {
  248. throw ExceptionEx.ThrowBusinessException(ex);
  249. }
  250. }
  251. }
  252. public IEnumerable<ClassInfoEntity> GetClassByMajorNo(string MajorNo)
  253. {
  254. try
  255. {
  256. return classInfoService.GetClassByMajorNo(MajorNo);
  257. }
  258. catch (Exception ex)
  259. {
  260. if (ex is ExceptionEx)
  261. {
  262. throw;
  263. }
  264. else
  265. {
  266. throw ExceptionEx.ThrowBusinessException(ex);
  267. }
  268. }
  269. }
  270. #endregion
  271. }
  272. }