Пример #1
0
        public async Task <Document> CheckInDocument(int documentId, string why, string what,
                                                     bool isNewRevision, byte[] file,
                                                     string fileName, string extension, int loginId)
        {
            var action = AccessLog.RevisionCreation;

            if (!isNewRevision)
            {
                action = AccessLog.VersionCreation;
            }

            DocumentAccessHistory accessHistory = GetAccessDetails(documentId, documentId, loginId, action);
            await _accessRepository.InsertDocumentAccessLog(accessHistory);

            return(await _repository.CheckInDocument(documentId, why, what,
                                                     isNewRevision, file, fileName, extension, loginId));
        }