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.

ScheduleBLL.cs 3.8 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. using Learun.Util;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Learun.Application.OA.Schedule
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创建人:陈彬彬
  13. /// 日 期:2017.07.11
  14. /// 描 述:日程管理
  15. /// </summary>
  16. public class ScheduleBLL : ScheduleIBLL
  17. {
  18. private ScheduleService scheduleService = new ScheduleService();
  19. #region 获取数据
  20. /// <summary>
  21. /// 获取页面显示列表分页数据
  22. /// <summary>
  23. /// <param name="pagination">分页参数</param>
  24. /// <param name="queryJson">查询参数</param>
  25. /// <returns></returns>
  26. public IEnumerable<ScheduleEntity> GetPageListByUserId(Pagination pagination, string queryJson, string userId)
  27. {
  28. try
  29. {
  30. return scheduleService.GetPageListByUserId(pagination, queryJson, userId);
  31. }
  32. catch (Exception ex)
  33. {
  34. if (ex is ExceptionEx)
  35. {
  36. throw;
  37. }
  38. else
  39. {
  40. throw ExceptionEx.ThrowBusinessException(ex);
  41. }
  42. }
  43. }
  44. /// <summary>
  45. /// 获取列表
  46. /// </summary>
  47. /// <returns>返回列表</returns>
  48. public IEnumerable<ScheduleEntity> GetList()
  49. {
  50. try
  51. {
  52. return scheduleService.GetList();
  53. }
  54. catch (Exception ex)
  55. {
  56. if (ex is ExceptionEx)
  57. {
  58. throw;
  59. }
  60. else
  61. {
  62. throw ExceptionEx.ThrowBusinessException(ex);
  63. }
  64. }
  65. }
  66. /// <summary>
  67. /// 获取实体
  68. /// </summary>
  69. /// <param name="keyValue">主键值</param>
  70. /// <returns></returns>
  71. public ScheduleEntity GetEntity(string keyValue)
  72. {
  73. try
  74. {
  75. return scheduleService.GetEntity(keyValue);
  76. }
  77. catch (Exception ex)
  78. {
  79. if (ex is ExceptionEx)
  80. {
  81. throw;
  82. }
  83. else
  84. {
  85. throw ExceptionEx.ThrowBusinessException(ex);
  86. }
  87. }
  88. }
  89. #endregion
  90. #region 提交数据
  91. /// <summary>
  92. /// 删除数据
  93. /// </summary>
  94. /// <param name="keyValue">主键</param>
  95. public void RemoveForm(string keyValue)
  96. {
  97. try
  98. {
  99. scheduleService.RemoveForm(keyValue);
  100. }
  101. catch (Exception ex)
  102. {
  103. if (ex is ExceptionEx)
  104. {
  105. throw;
  106. }
  107. else
  108. {
  109. throw ExceptionEx.ThrowBusinessException(ex);
  110. }
  111. }
  112. }
  113. /// <summary>
  114. /// 保存表单(新增、修改)
  115. /// </summary>
  116. /// <param name="keyValue">主键值</param>
  117. /// <param name="entity">实体对象</param>
  118. /// <returns></returns>
  119. public void SaveForm(string keyValue, ScheduleEntity entity)
  120. {
  121. try
  122. {
  123. scheduleService.SaveForm(keyValue, entity);
  124. }
  125. catch (Exception ex)
  126. {
  127. if (ex is ExceptionEx)
  128. {
  129. throw;
  130. }
  131. else
  132. {
  133. throw ExceptionEx.ThrowBusinessException(ex);
  134. }
  135. }
  136. }
  137. #endregion
  138. }
  139. }