using Learun.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Learun.Application.OA.Schedule
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创建人:陈彬彬
/// 日 期:2017.07.11
/// 描 述:日程管理
///
public class ScheduleBLL : ScheduleIBLL
{
private ScheduleService scheduleService = new ScheduleService();
#region 获取数据
///
/// 获取页面显示列表分页数据
///
/// 分页参数
/// 查询参数
///
public IEnumerable GetPageListByUserId(Pagination pagination, string queryJson, string userId)
{
try
{
return scheduleService.GetPageListByUserId(pagination, queryJson, userId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取列表
///
/// 返回列表
public IEnumerable GetList()
{
try
{
return scheduleService.GetList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 获取实体
///
/// 主键值
///
public ScheduleEntity GetEntity(string keyValue)
{
try
{
return scheduleService.GetEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region 提交数据
///
/// 删除数据
///
/// 主键
public void RemoveForm(string keyValue)
{
try
{
scheduleService.RemoveForm(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 保存表单(新增、修改)
///
/// 主键值
/// 实体对象
///
public void SaveForm(string keyValue, ScheduleEntity entity)
{
try
{
scheduleService.SaveForm(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}