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.

TeachClassBLL.cs 6.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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 TeachClassBLL : TeachClassIBLL
  15. {
  16. private TeachClassService teachClassEntity = new TeachClassService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<TeachClassEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return teachClassEntity.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 teachClassEntity.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 TeachClassEntity GetTeachClassEntity(string keyValue)
  65. {
  66. try
  67. {
  68. return teachClassEntity.GetTeachClassEntity(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. #endregion
  88. #region 提交数据
  89. public void DeleteEntity(string keyValue)
  90. {
  91. try
  92. {
  93. teachClassEntity.DeleteEntity(keyValue);
  94. }
  95. catch (Exception ex)
  96. {
  97. if (ex is ExceptionEx)
  98. {
  99. throw;
  100. }
  101. else
  102. {
  103. throw ExceptionEx.ThrowBusinessException(ex);
  104. }
  105. }
  106. }
  107. /// <summary>
  108. /// 保存实体数据(新增、修改)
  109. /// <param name="keyValue">主键</param>
  110. /// <summary>
  111. /// <returns></returns>
  112. public void SaveEntity(string keyValue, TeachClassEntity entity)
  113. {
  114. try
  115. {
  116. teachClassEntity.SaveEntity(keyValue, entity);
  117. }
  118. catch (Exception ex)
  119. {
  120. if (ex is ExceptionEx)
  121. {
  122. throw;
  123. }
  124. else
  125. {
  126. throw ExceptionEx.ThrowBusinessException(ex);
  127. }
  128. }
  129. }
  130. public void SaveEntityList(List<TeachClassEntity> entity)
  131. {
  132. try
  133. {
  134. teachClassEntity.SaveEntityList(entity);
  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. #endregion
  149. #region 扩展数据
  150. /// <summary>
  151. /// 保存实体数据(新增、修改)
  152. /// <param name="keyValue">主键</param>
  153. /// <summary>
  154. /// <returns></returns>
  155. public List<TeachClassEntity> GetTeachListById(string keyValue)
  156. {
  157. try
  158. {
  159. return teachClassEntity.GetTeachListById(keyValue);
  160. }
  161. catch (Exception ex)
  162. {
  163. if (ex is ExceptionEx)
  164. {
  165. throw;
  166. }
  167. else
  168. {
  169. throw ExceptionEx.ThrowBusinessException(ex);
  170. }
  171. }
  172. }
  173. /// <summary>
  174. /// 查询条件
  175. /// </summary>
  176. /// <returns></returns>
  177. public IEnumerable<TeachClassEntity> GetAllClass()
  178. {
  179. try
  180. {
  181. return teachClassEntity.GetAllClass();
  182. }
  183. catch (Exception ex)
  184. {
  185. if (ex is ExceptionEx)
  186. {
  187. throw;
  188. }
  189. else
  190. {
  191. throw ExceptionEx.ThrowBusinessException(ex);
  192. }
  193. }
  194. }
  195. /// <summary>
  196. /// 保存实体数据(新增、修改)
  197. /// <param name="keyValue">主键</param>
  198. /// <summary>
  199. /// <returns></returns>
  200. public void UpEmpNo(string keyValue, string EmpNo)
  201. {
  202. try
  203. {
  204. teachClassEntity.UpEmpNo(keyValue, EmpNo);
  205. }
  206. catch (Exception ex)
  207. {
  208. if (ex is ExceptionEx)
  209. {
  210. throw;
  211. }
  212. else
  213. {
  214. throw ExceptionEx.ThrowBusinessException(ex);
  215. }
  216. }
  217. }
  218. #endregion
  219. }
  220. }