예제 #1
0
        /// <summary>
        /// CheckIn di un documento
        /// </summary>
        /// <param name="checkOutInfo">Informazioni di stato sul documento in checkOut</param>
        /// <returns></returns>
        public bool CheckIn(CheckOutStatus checkOutStatus, byte[] content, string checkInComments)
        {
            bool retValue = LockDocumentManager.ManualUnlock(checkOutStatus.DocumentNumber);

            if (retValue)
            {
                // Creazione della versione del documento
                retValue = this.CreateDocumentVersion(checkOutStatus, content, checkInComments, this.InfoUtente);
            }

            return(retValue);
        }
예제 #2
0
        /// <summary>
        /// Annullamento del blocco del documento nel documentale
        /// </summary>
        /// <param name="adminInfoUtente"></param>
        /// <param name="checkOutAdminStatus"></param>
        /// <returns></returns>
        public bool ForceUndoCheckOut(CheckOutStatus checkOutAdminStatus)
        {
            if (this.CanForceUndoCheckOut())
            {
                string library = this.GetLibrary(this.InfoUtente.idAmministrazione);

                return(LockDocumentManager.UnLock(checkOutAdminStatus.DocumentNumber, this.InfoUtente.dst, library));
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
        /// <summary>
        /// CheckOut di un documento
        /// </summary>
        /// <param name="checkOutInfo"></param>
        /// <returns></returns>
        public bool CheckOut(string idDocument, string documentNumber, string documentLocation, string machineName, out CheckOutStatus checkOutStatus)
        {
            checkOutStatus = null;
            bool retValue = false;

            try
            {
                // Impostazione del CheckOut nel documentale
                retValue = LockDocumentManager.ManualLock(documentNumber, string.Empty, documentLocation, this.InfoUtente.idPeople, this.InfoUtente.dst, this.Library);

                if (retValue)
                {
                    checkOutStatus = this.GetCheckOutStatus(idDocument, documentNumber);
                }
            }
            catch (Exception ex)
            {
                logger.Debug(ex.Message, ex);

                throw new ApplicationException("Errore nel checkout del documento. IDDocumento: " + idDocument, ex);
            }

            return(retValue);
        }
예제 #4
0
 /// <summary>
 /// Annullamento dello stato CheckedOut per un documento
 /// </summary>
 /// <param name="checkOutInfo"></param>
 /// <returns></returns>
 public bool UndoCheckOut(CheckOutStatus checkOutStatus)
 {
     return(LockDocumentManager.ManualUnlock(checkOutStatus.DocumentNumber));
 }