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.
 
 
 
 
 
 

281 lines
7.3 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. public IEnumerable<ClassInfoEntity> GetListByAccount(string account)
  129. {
  130. try
  131. {
  132. return classInfoService.GetListByAccount(account);
  133. }
  134. catch (Exception ex)
  135. {
  136. if (ex is ExceptionEx)
  137. {
  138. throw;
  139. }
  140. else
  141. {
  142. throw ExceptionEx.ThrowBusinessException(ex);
  143. }
  144. }
  145. }
  146. #endregion
  147. #region 提交数据
  148. public void Lock(string keyValue)
  149. {
  150. try
  151. {
  152. classInfoService.Lock(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. public void UnLock(string keyValue)
  167. {
  168. try
  169. {
  170. classInfoService.UnLock(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 DeleteEntity(string keyValue)
  190. {
  191. try
  192. {
  193. classInfoService.DeleteEntity(keyValue);
  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. /// <summary>
  208. /// 保存实体数据(新增、修改)
  209. /// <param name="keyValue">主键</param>
  210. /// <summary>
  211. /// <returns></returns>
  212. public void SaveEntity(string keyValue, ClassInfoEntity entity)
  213. {
  214. try
  215. {
  216. classInfoService.SaveEntity(keyValue, entity);
  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> GetAllClass()
  231. {
  232. try
  233. {
  234. return classInfoService.GetAllClass();
  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. public IEnumerable<ClassInfoEntity> GetClassByMajorNo(string MajorNo)
  249. {
  250. try
  251. {
  252. return classInfoService.GetClassByMajorNo(MajorNo);
  253. }
  254. catch (Exception ex)
  255. {
  256. if (ex is ExceptionEx)
  257. {
  258. throw;
  259. }
  260. else
  261. {
  262. throw ExceptionEx.ThrowBusinessException(ex);
  263. }
  264. }
  265. }
  266. #endregion
  267. }
  268. }