140 lines
3.7 KiB
C#
140 lines
3.7 KiB
C#
using Learun.Util;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
|
||
namespace Learun.Application.CRM
|
||
{
|
||
/// <summary>
|
||
/// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
|
||
/// Copyright (c) 2013-2018 勤一科技
|
||
/// 创 建:超级管理员
|
||
/// 日 期:2017-07-11 14:28
|
||
/// 描 述:费用支出
|
||
/// </summary>
|
||
public class CrmExpensesBLL : CrmExpensesIBLL
|
||
{
|
||
CrmExpensesService crmExpensesService = new CrmExpensesService();
|
||
|
||
#region 获取数据
|
||
/// <summary>
|
||
/// 获取列表
|
||
/// </summary>
|
||
/// <param name="pagination">分页</param>
|
||
/// <param name="queryJson">查询参数</param>
|
||
/// <returns>返回分页列表</returns>
|
||
public IEnumerable<CrmExpensesEntity> GetPageList(Pagination pagination, string queryJson)
|
||
{
|
||
try
|
||
{
|
||
return crmExpensesService.GetPageList(pagination, queryJson);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowBusinessException(ex);
|
||
}
|
||
}
|
||
}
|
||
/// <summary>
|
||
/// 获取列表
|
||
/// </summary>
|
||
/// <param name="queryJson">查询参数</param>
|
||
/// <returns>返回列表</returns>
|
||
public IEnumerable<CrmExpensesEntity> GetList(string queryJson)
|
||
{
|
||
try
|
||
{
|
||
return crmExpensesService.GetList(queryJson);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowBusinessException(ex);
|
||
}
|
||
}
|
||
}
|
||
/// <summary>
|
||
/// 获取实体
|
||
/// </summary>
|
||
/// <param name="keyValue">主键值</param>
|
||
/// <returns></returns>
|
||
public CrmExpensesEntity GetEntity(string keyValue)
|
||
{
|
||
try
|
||
{
|
||
return crmExpensesService.GetEntity(keyValue);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowBusinessException(ex);
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 提交数据
|
||
/// <summary>
|
||
/// 删除数据
|
||
/// </summary>
|
||
/// <param name="keyValue">主键</param>
|
||
public void DeleteEntity(string keyValue)
|
||
{
|
||
try
|
||
{
|
||
crmExpensesService.DeleteEntity(keyValue);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowServiceException(ex);
|
||
}
|
||
}
|
||
}
|
||
/// <summary>
|
||
/// 保存表单(新增)
|
||
/// </summary>
|
||
/// <param name="entity">实体对象</param>
|
||
/// <returns></returns>
|
||
public void SaveEntity(CrmExpensesEntity entity)
|
||
{
|
||
try
|
||
{
|
||
crmExpensesService.SaveEntity(entity);
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
if (ex is ExceptionEx)
|
||
{
|
||
throw;
|
||
}
|
||
else
|
||
{
|
||
throw ExceptionEx.ThrowServiceException(ex);
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
}
|
||
}
|