using Lottomat.Application.Entity.PublicInfoManage; using Lottomat.Application.IService.PublicInfoManage; using Lottomat.Application.Service.PublicInfoManage; using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; namespace Lottomat.Application.Busines.PublicInfoManage { /// /// 版 本 1.0 /// Copyright (c) 2016-2017 /// 创建人:赵轶 /// 日 期:2015.12.15 10:56 /// 描 述:文件信息 /// public class FileInfoBLL { private IFileInfoService service = new FileInfoService(); #region 获取数据 /// /// 获取所有数据 /// /// /// public List GetList(Expression> condition) { return service.GetList(condition).ToList(); } /// /// 所有文件(夹)列表 /// /// 文件夹Id /// 用户Id /// public IEnumerable GetList(string folderId, string userId) { return service.GetList(folderId, userId); } /// /// 文档列表 /// /// 用户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 } }