147 lines
3.9 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Learun.Util;
using System;
using System.Collections.Generic;
namespace Learun.Application.Excel
{
/// <summary>
/// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
/// Copyright (c) 2013-2018 勤一科技
/// 创建人:研发部
/// 日 期2017.04.01
/// 描 述Excel数据导出设置
/// </summary>
public class ExcelExportBLL : ExcelExportIBLL
{
private ExcelExportService excelExportService = new ExcelExportService();
#region
/// <summary>
/// 获取列表分页数据
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <summary>
/// <returns></returns>
public IEnumerable<ExcelExportEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return excelExportService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取列表
/// <param name="moduleId">功能模块主键</param>
/// <summary>
/// <returns></returns>
public IEnumerable<ExcelExportEntity> GetList(string moduleId)
{
try
{
return excelExportService.GetList(moduleId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public ExcelExportEntity GetEntity(string keyValue)
{
try
{
return excelExportService.GetEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region
/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
excelExportService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <param name="entity">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, ExcelExportEntity entity)
{
try
{
excelExportService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}