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.
 
 
 
 
 
 

165 lines
4.4 KiB

  1. using Learun.Util;
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. namespace Learun.Application.TwoDevelopment.LogisticsManagement
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2020-06-12 11:21
  12. /// 描 述:校区新闻
  13. /// </summary>
  14. public class CompanyNewsBLL : CompanyNewsIBLL
  15. {
  16. private CompanyNewsService companyNewsService = new CompanyNewsService();
  17. #region 获取数据
  18. /// <summary>
  19. /// 获取页面显示列表数据
  20. /// <summary>
  21. /// <param name="queryJson">查询参数</param>
  22. /// <returns></returns>
  23. public IEnumerable<CompanyNewsEntity> GetPageList(Pagination pagination, string queryJson)
  24. {
  25. try
  26. {
  27. return companyNewsService.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. /// 根据校区id 获取新闻列表
  43. /// <summary>
  44. /// <returns></returns>
  45. public IEnumerable<CompanyNewsEntity> GetListByCompanyID(string companyID)
  46. {
  47. try
  48. {
  49. return companyNewsService.GetListByCompanyID(companyID);
  50. }
  51. catch (Exception ex)
  52. {
  53. if (ex is ExceptionEx)
  54. {
  55. throw;
  56. }
  57. else
  58. {
  59. throw ExceptionEx.ThrowBusinessException(ex);
  60. }
  61. }
  62. }
  63. /// <summary>
  64. /// 获取CompanyNews表实体数据
  65. /// <param name="keyValue">主键</param>
  66. /// <summary>
  67. /// <returns></returns>
  68. public CompanyNewsEntity GetCompanyNewsEntity(string keyValue)
  69. {
  70. try
  71. {
  72. return companyNewsService.GetCompanyNewsEntity(keyValue);
  73. }
  74. catch (Exception ex)
  75. {
  76. if (ex is ExceptionEx)
  77. {
  78. throw;
  79. }
  80. else
  81. {
  82. throw ExceptionEx.ThrowBusinessException(ex);
  83. }
  84. }
  85. }
  86. public CompanyNewsEntity GetCompanyNewsEntityByCompanyID(string company)
  87. {
  88. try
  89. {
  90. return companyNewsService.GetCompanyNewsEntityByCompanyID(company);
  91. }
  92. catch (Exception ex)
  93. {
  94. if (ex is ExceptionEx)
  95. {
  96. throw;
  97. }
  98. else
  99. {
  100. throw ExceptionEx.ThrowBusinessException(ex);
  101. }
  102. }
  103. }
  104. #endregion
  105. #region 提交数据
  106. /// <summary>
  107. /// 删除实体数据
  108. /// <param name="keyValue">主键</param>
  109. /// <summary>
  110. /// <returns></returns>
  111. public void DeleteEntity(string keyValue)
  112. {
  113. try
  114. {
  115. companyNewsService.DeleteEntity(keyValue);
  116. }
  117. catch (Exception ex)
  118. {
  119. if (ex is ExceptionEx)
  120. {
  121. throw;
  122. }
  123. else
  124. {
  125. throw ExceptionEx.ThrowBusinessException(ex);
  126. }
  127. }
  128. }
  129. /// <summary>
  130. /// 保存实体数据(新增、修改)
  131. /// <param name="keyValue">主键</param>
  132. /// <summary>
  133. /// <returns></returns>
  134. public void SaveEntity(string keyValue, CompanyNewsEntity entity)
  135. {
  136. try
  137. {
  138. companyNewsService.SaveEntity(keyValue, entity);
  139. }
  140. catch (Exception ex)
  141. {
  142. if (ex is ExceptionEx)
  143. {
  144. throw;
  145. }
  146. else
  147. {
  148. throw ExceptionEx.ThrowBusinessException(ex);
  149. }
  150. }
  151. }
  152. #endregion
  153. }
  154. }