/// <summary> /// Aggiorna il documento firmato in BiblosDs2010 /// </summary> public BiblosDocumentInfo UpdateSignedDocument(Desk desk, DeskRoleUser roleUser, Guid idDeskDocument, BiblosDocumentInfo documentToUpdate, string userId) { DeskDocument deskDocument = this.GetById(idDeskDocument); BiblosDocumentInfo documentUpdated = documentToUpdate.Update(userId); DeskDocumentVersion docVersion = DeskDocumentVersionFacade.InsertDocumentVersion(documentUpdated.DocumentId, documentUpdated.Version, deskDocument); AddCommentStoryBoard(documentUpdated, desk, roleUser, docVersion, DeskStoryBoardType.SignedDocument); return(documentUpdated); }
/// <summary> /// CheckIn di una specifica versione del documento. /// </summary> /// <param name="idDocument"></param> /// <param name="docName"></param> /// <param name="content"></param> /// <param name="userId"></param> /// <param name="contentFormat"></param> /// <param name="version">Ritorna la versione corrente del documento appena inserito</param> /// <returns></returns> public BiblosDocumentInfo CheckIn(Desk desk, DeskRoleUser roleUser, Guid?idDeskDocument, Guid idDocument, string docName, byte[] content, string userId, ContentFormat contentFormat, decimal?version) { DeskDocument deskDocument = GetById(idDeskDocument.Value, false); BiblosDocumentInfo newDoc = BiblosDocumentInfo.CheckInDocument(idDocument, docName, content, userId, contentFormat, version); UpdateDocumentCheckIn(idDeskDocument, newDoc.DocumentId); decimal newversion = version ?? newDoc.Version; DeskDocumentVersion docVersion = DeskDocumentVersionFacade.InsertDocumentVersion(newDoc.DocumentId, newversion, deskDocument); AddCommentStoryBoard(newDoc, desk, roleUser, docVersion, DeskStoryBoardType.CheckInComment); return(newDoc); }