using Learun.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Learun.Application.OA.Schedule
{
///
/// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
/// Copyright (c) 2013-2018 Hexagon PPM
/// 创建人:研发部
/// 日 期:2017.07.11
/// 描 述:日程管理
///
public class ScheduleBLL: ScheduleIBLL
{
private ScheduleService scheduleService = new ScheduleService();
#region 获取数据
///
/// 获取列表
///
/// 返回列表
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
}
}