using System;
using System.Collections.Generic;
namespace Learun.Application.OA.File.FileInfo
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2017
/// 创建人:陈彬彬
/// 日 期:2018.06.20
/// 描 述:文件管理
///
public class FileInfoBLL : FileInfoIBLL
{
private FileInfoService service = new FileInfoService();
#region 获取数据
///
/// 所有文件(夹)列表
///
/// 文件夹Id
/// 用户Id
///
public IEnumerable GetList(string folderId, string userId)
{
return service.GetList(folderId, userId);
}
public IEnumerable GetList(string userId)
{
return service.GetList(userId);
}
public IEnumerable GetList()
{
return service.GetList();
}
///
/// 文档列表
///
/// 用户Id
///
public IEnumerable GetDocumentList(string userId)
{
return service.GetDocumentList(userId);
}
///
/// 图片列表
///
/// 用户Id
///
public IEnumerable GetImageList(string userId)
{
return service.GetImageList(userId);
}
///
/// 回收站文件(夹)列表
///
/// 用户Id
///
public IEnumerable GetRecycledList(string userId)
{
return service.GetRecycledList(userId);
}
///
/// 我的文件(夹)共享列表
///
/// 用户Id
///
public IEnumerable GetMyShareList(string userId)
{
return service.GetMyShareList(userId);
}
///
/// 他人文件(夹)共享列表
///
/// 用户Id
///
public IEnumerable GetOthersShareList(string userId)
{
return service.GetOthersShareList(userId);
}
///
/// 文件信息实体
///
/// 主键值
///
public FileInfoEntity GetEntity(string keyValue)
{
return service.GetEntity(keyValue);
}
#endregion
#region 提交数据
///
/// 还原文件
///
/// 主键
public void RestoreFile(string keyValue)
{
try
{
service.RestoreFile(keyValue);
}
catch (Exception)
{
throw;
}
}
///
/// 删除文件信息
///
/// 主键
public void RemoveForm(string keyValue)
{
try
{
service.RemoveForm(keyValue);
}
catch (Exception)
{
throw;
}
}
///
/// 彻底删除文件信息
///
/// 主键
public void ThoroughRemoveForm(string keyValue)
{
try
{
service.ThoroughRemoveForm(keyValue);
}
catch (Exception)
{
throw;
}
}
///
/// 保存文件信息表单(新增、修改)
///
/// 主键值
/// 文件信息实体
///
public void SaveForm(string keyValue, FileInfoEntity fileInfoEntity)
{
try
{
service.SaveForm(keyValue, fileInfoEntity);
}
catch (Exception)
{
throw;
}
}
///
/// 共享文件
///
/// 主键
/// 是否共享:1-共享 0取消共享
public void ShareFile(string keyValue, int IsShare = 1)
{
try
{
service.ShareFile(keyValue, IsShare);
}
catch (Exception)
{
throw;
}
}
#endregion
}
}