/// <summary> /// 更新實體存放資料 /// </summary> /// <param name="storageFileVO">被更新的實體存放資料</param> /// <returns>更新後的實體存放資料</returns> public StorageFileVO UpdateStorageFile(StorageFileVO storageFileVO) { //檔案搬移到public資料夾 storageFileVO = StorageHelper.RemoveStorageFile(FolderType.PUBLIC_FOLDER, storageFileVO); storageFileVO.IsTemporary = false; return(StorageFileDao.UpdateStorageFile(storageFileVO)); }
/// <summary> /// 新增實體存放資料 /// </summary> /// <param name="storageFileVO">被新增的實體存放資料</param> /// <returns>新增後的實體存放資料</returns> public StorageFileVO CreateStorageFile(StorageFileVO storageFileVO) { //檔案搬移到public資料夾 storageFileVO = StorageHelper.RemoveStorageFile(FolderType.PUBLIC_FOLDER, storageFileVO); storageFileVO.IsTemporary = false; storageFileVO = StorageFileDao.CreateStorageFile(storageFileVO); if (storageFileVO.SortNo == 0) { storageFileVO.SortNo = storageFileVO.StorageFileId; storageFileVO = StorageFileDao.UpdateStorageFile(storageFileVO); } return(storageFileVO); }