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.
 
 
 
 
 
 

229 lines
5.9 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-28 17:30
  12. /// 描 述:教室信息管理
  13. /// </summary>
  14. public class ClassroomInfoBLL : ClassroomInfoIBLL
  15. {
  16. private ClassroomInfoService classroomInfoService = new ClassroomInfoService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<ClassroomInfoEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return classroomInfoService.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. /// 获取页面显示列表数据
  43. /// <summary>
  44. /// <param name="queryJson">查询参数</param>
  45. /// <returns></returns>
  46. public IEnumerable<ClassroomInfoEntity> GetAllList()
  47. {
  48. try
  49. {
  50. return classroomInfoService.GetAllList();
  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. /// 获取ClassroomInfo表实体数据
  66. /// <param name="keyValue">主键</param>
  67. /// <summary>
  68. /// <returns></returns>
  69. public ClassroomInfoEntity GetClassroomInfoEntity(string keyValue)
  70. {
  71. try
  72. {
  73. return classroomInfoService.GetClassroomInfoEntity(keyValue);
  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. /// <summary>
  88. /// 获取ClassroomInfo表实体数据
  89. /// <param name="classroomNo">教室编号</param>
  90. /// <summary>
  91. /// <returns></returns>
  92. public ClassroomInfoEntity GetClassroomInfoEntityByNo(string classroomNo)
  93. {
  94. try
  95. {
  96. return classroomInfoService.GetClassroomInfoEntityByNo(classroomNo);
  97. }
  98. catch (Exception ex)
  99. {
  100. if (ex is ExceptionEx)
  101. {
  102. throw;
  103. }
  104. else
  105. {
  106. throw ExceptionEx.ThrowBusinessException(ex);
  107. }
  108. }
  109. }
  110. public bool GetAny()
  111. {
  112. try
  113. {
  114. return classroomInfoService.GetAny();
  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. /// <summary>
  131. /// 删除实体数据
  132. /// <param name="keyValue">主键</param>
  133. /// <summary>
  134. /// <returns></returns>
  135. public void DeleteEntity(string keyValue)
  136. {
  137. try
  138. {
  139. classroomInfoService.DeleteEntity(keyValue);
  140. }
  141. catch (Exception ex)
  142. {
  143. if (ex is ExceptionEx)
  144. {
  145. throw;
  146. }
  147. else
  148. {
  149. throw ExceptionEx.ThrowBusinessException(ex);
  150. }
  151. }
  152. }
  153. /// <summary>
  154. /// 保存实体数据(新增、修改)
  155. /// <param name="keyValue">主键</param>
  156. /// <summary>
  157. /// <returns></returns>
  158. public void SaveEntity(string keyValue, ClassroomInfoEntity entity)
  159. {
  160. try
  161. {
  162. classroomInfoService.SaveEntity(keyValue, entity);
  163. }
  164. catch (Exception ex)
  165. {
  166. if (ex is ExceptionEx)
  167. {
  168. throw;
  169. }
  170. else
  171. {
  172. throw ExceptionEx.ThrowBusinessException(ex);
  173. }
  174. }
  175. }
  176. public void Lock(string keyValue)
  177. {
  178. try
  179. {
  180. classroomInfoService.Lock(keyValue);
  181. }
  182. catch (Exception ex)
  183. {
  184. if (ex is ExceptionEx)
  185. {
  186. throw;
  187. }
  188. else
  189. {
  190. throw ExceptionEx.ThrowBusinessException(ex);
  191. }
  192. }
  193. }
  194. public void UnLock(string keyValue)
  195. {
  196. try
  197. {
  198. classroomInfoService.UnLock(keyValue);
  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. #endregion
  213. }
  214. }