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.
 
 
 
 
 
 

163 lines
4.2 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-07-08 17:19
  12. /// 描 述:教师注册功能开关控制
  13. /// </summary>
  14. public class TeachSwitchBLL : TeachSwitchIBLL
  15. {
  16. private TeachSwitchService teachSwitchService = new TeachSwitchService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<TeachSwitchEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return teachSwitchService.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. /// 获取TeachSwitch表实体数据
  43. /// <param name="keyValue">主键</param>
  44. /// <summary>
  45. /// <returns></returns>
  46. public TeachSwitchEntity GetTeachSwitchEntity(string keyValue)
  47. {
  48. try
  49. {
  50. return teachSwitchService.GetTeachSwitchEntity(keyValue);
  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. public bool FindFirst(string type)
  65. {
  66. try
  67. {
  68. return teachSwitchService.FindFirst(type);
  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. public TeachSwitchEntity GetFirst(string type)
  83. {
  84. try
  85. {
  86. return teachSwitchService.GetFirst(type);
  87. }
  88. catch (Exception ex)
  89. {
  90. if (ex is ExceptionEx)
  91. {
  92. throw;
  93. }
  94. else
  95. {
  96. throw ExceptionEx.ThrowBusinessException(ex);
  97. }
  98. }
  99. }
  100. #endregion
  101. #region 提交数据
  102. /// <summary>
  103. /// 删除实体数据
  104. /// <param name="keyValue">主键</param>
  105. /// <summary>
  106. /// <returns></returns>
  107. public void DeleteEntity(string keyValue)
  108. {
  109. try
  110. {
  111. teachSwitchService.DeleteEntity(keyValue);
  112. }
  113. catch (Exception ex)
  114. {
  115. if (ex is ExceptionEx)
  116. {
  117. throw;
  118. }
  119. else
  120. {
  121. throw ExceptionEx.ThrowBusinessException(ex);
  122. }
  123. }
  124. }
  125. /// <summary>
  126. /// 保存实体数据(新增、修改)
  127. /// <param name="keyValue">主键</param>
  128. /// <summary>
  129. /// <returns></returns>
  130. public void SaveEntity(string keyValue, TeachSwitchEntity entity)
  131. {
  132. try
  133. {
  134. teachSwitchService.SaveEntity(keyValue, 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. }
  150. }