public object PostAddEditFolder(DocumentFolderDTO documentFolderDTO) { using (DocumentFolderService documentFolderService = new DocumentFolderService()) { sysBpmsDocumentFolder documentFolder = !documentFolderDTO.ID.IsNullOrEmpty() ? documentFolderService.GetInfo(documentFolderDTO.ID) : new sysBpmsDocumentFolder(); documentFolder.Update(documentFolderDTO.DocumentFolderID, documentFolderDTO.NameOf, documentFolderDTO.DisplayName, true); ResultOperation resultOperation = null; if (!documentFolderDTO.ID.IsNullOrEmpty()) { resultOperation = documentFolderService.Update(documentFolder); } else { resultOperation = documentFolderService.Add(documentFolder); } if (resultOperation.IsSuccess) { return(new PostMethodMessage(SharedLang.Get("Success.Text"), DisplayMessageType.success, documentFolder.ID)); } else { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } } }
public object GetInActiveFolder(Guid id) { using (DocumentFolderService documentFolderService = new DocumentFolderService()) { sysBpmsDocumentFolder sysBpmsDocumentFolder = documentFolderService.GetInfo(id); sysBpmsDocumentFolder.InActive(); ResultOperation resultOperation = documentFolderService.Update(sysBpmsDocumentFolder); if (resultOperation.IsSuccess) { return(new PostMethodMessage(SharedLang.Get("Success.Text"), DisplayMessageType.success)); } else { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } } }