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.
 
 
 
 
 
 

149 lines
4.0 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 V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2021-05-21 11:05
  12. /// 描 述:校园新闻
  13. /// </summary>
  14. public class SchoolNewsBLL : SchoolNewsIBLL
  15. {
  16. private SchoolNewsService schoolNewsService = new SchoolNewsService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// </summary>
  21. /// <param name="pagination">分页参数</param>
  22. /// <param name="queryJson">查询参数</param>
  23. /// <returns></returns>
  24. public IEnumerable<LR_OA_SchoolNewsEntity> GetPageList(Pagination pagination, string queryJson)
  25. {
  26. try
  27. {
  28. return schoolNewsService.GetPageList(pagination, queryJson);
  29. }
  30. catch (Exception ex)
  31. {
  32. if (ex is ExceptionEx)
  33. {
  34. throw;
  35. }
  36. else
  37. {
  38. throw ExceptionEx.ThrowBusinessException(ex);
  39. }
  40. }
  41. }
  42. /// <summary>
  43. /// 获取页面显示列表数据
  44. /// </summary>
  45. /// <returns></returns>
  46. public IEnumerable<LR_OA_SchoolNewsEntity> GetListByCategoryId(string categoryId)
  47. {
  48. try
  49. {
  50. return schoolNewsService.GetListByCategoryId(categoryId);
  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. /// 获取LR_OA_SchoolNews表实体数据
  66. /// </summary>
  67. /// <param name="keyValue">主键</param>
  68. /// <returns></returns>
  69. public LR_OA_SchoolNewsEntity GetLR_OA_SchoolNewsEntity(string keyValue)
  70. {
  71. try
  72. {
  73. return schoolNewsService.GetLR_OA_SchoolNewsEntity(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. #endregion
  88. #region 提交数据
  89. /// <summary>
  90. /// 删除实体数据
  91. /// </summary>
  92. /// <param name="keyValue">主键</param>
  93. public void DeleteEntity(string keyValue)
  94. {
  95. try
  96. {
  97. schoolNewsService.DeleteEntity(keyValue);
  98. }
  99. catch (Exception ex)
  100. {
  101. if (ex is ExceptionEx)
  102. {
  103. throw;
  104. }
  105. else
  106. {
  107. throw ExceptionEx.ThrowBusinessException(ex);
  108. }
  109. }
  110. }
  111. /// <summary>
  112. /// 保存实体数据(新增、修改)
  113. /// </summary>
  114. /// <param name="keyValue">主键</param>
  115. /// <param name="entity">实体</param>
  116. /// <returns></returns>
  117. public void SaveEntity(string keyValue, LR_OA_SchoolNewsEntity entity)
  118. {
  119. try
  120. {
  121. schoolNewsService.SaveEntity(keyValue, entity);
  122. }
  123. catch (Exception ex)
  124. {
  125. if (ex is ExceptionEx)
  126. {
  127. throw;
  128. }
  129. else
  130. {
  131. throw ExceptionEx.ThrowBusinessException(ex);
  132. }
  133. }
  134. }
  135. #endregion
  136. }
  137. }