Пример #1
0
        private string CheckOutFilePath()
        {
            string retValue = string.Empty;

            CheckInOutServices.InitializeContext();

            if (DocumentManager.getSelectedAttachId() == null)
            {
                NttDataWA.DocsPaWR.SchedaDocumento schedaDoc = CheckInOutServices.CurrentSchedaDocumento;
                if (schedaDoc != null && schedaDoc.checkOutStatus != null)
                {
                    retValue = schedaDoc.checkOutStatus.DocumentLocation;
                }
            }
            else
            {
                NttDataWA.DocsPaWR.CheckOutStatus tempStatus = DocumentManager.GetCheckOutDocumentStatus(DocumentManager.GetSelectedAttachment().docNumber);
                if (tempStatus != null)
                {
                    retValue = DocumentManager.GetCheckOutDocumentStatus(DocumentManager.GetSelectedAttachment().docNumber).DocumentLocation;
                }
            }

            return(retValue.Replace(@"\", @"\\"));
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                CheckInOutServices.InitializeContext();
                if (UIManager.DocumentManager.getSelectedAttachId() == null && CheckInOutServices.CurrentSchedaDocumento != null && CheckInOutServices.CurrentSchedaDocumento.protocollo != null && CheckInOutServices.CurrentSchedaDocumento.protocollo.segnatura != null && !string.IsNullOrEmpty(CheckInOutServices.CurrentSchedaDocumento.protocollo.segnatura))
                {
                    file_name = UIManager.UserManager.normalizeStringPropertyValue(CheckInOutServices.CurrentSchedaDocumento.protocollo.segnatura);
                }
                else
                {
                    if (CheckInOutServices.CurrentSchedaDocumento != null && CheckInOutServices.CurrentSchedaDocumento.docNumber != null && !string.IsNullOrEmpty(CheckInOutServices.CurrentSchedaDocumento.docNumber))
                    {
                        if (UIManager.DocumentManager.getSelectedAttachId() != null)
                        {
                            file_name = UIManager.DocumentManager.GetSelectedAttachment().docNumber;
                        }
                        else
                        {
                            file_name = CheckInOutServices.CurrentSchedaDocumento.docNumber;
                        }
                    }
                }
                this.SetParameters();

                this.componentType = UIManager.UserManager.getComponentType(Request.UserAgent);
                this.initForm();
            }
        }
Пример #3
0
        private void loadCheckOutData()
        {
            string strUser     = string.Empty;
            string strRole     = string.Empty;
            string strData     = string.Empty;
            string strPath     = string.Empty;
            string strComputer = string.Empty;

            CheckInOutServices.InitializeContext();

            NttDataWA.DocsPaWR.SchedaDocumento schedaDoc  = CheckInOutServices.CurrentSchedaDocumento;
            DocsPaWR.CheckOutStatus            tempStatus = null;

            if (UIManager.DocumentManager.getSelectedAttachId() == null)
            {
                if (schedaDoc != null)
                {
                    tempStatus = schedaDoc.checkOutStatus;
                }
            }
            else
            {
                if (UIManager.DocumentManager.GetSelectedAttachment() != null)
                {
                    tempStatus = UIManager.DocumentManager.GetCheckOutDocumentStatus(UIManager.DocumentManager.GetSelectedAttachment().docNumber);
                }
            }


            if (tempStatus != null)
            {
                string temp_strUser = tempStatus.UserName;
                strRole     = tempStatus.RoleName;
                strData     = tempStatus.CheckOutDate.ToString();
                strPath     = tempStatus.DocumentLocation;
                strComputer = tempStatus.MachineName;

                if (!string.IsNullOrEmpty(temp_strUser))
                {
                    strUser = temp_strUser + " [" + UIManager.AddressBookManager.getCorrispondenteByCodRubrica(temp_strUser, true).descrizione + "]";
                }
            }

            this.lblUserNAme.Text      = strUser;
            this.lblRoleType.Text      = strRole;
            this.lblDataCheckOut.Text  = strData;
            this.lblLocalFilePath.Text = strPath;
            this.lblComputerName.Text  = strComputer;
        }
Пример #4
0
        /// <summary>
        /// Aggiornamento pannello checkinout
        /// </summary>
        /// <param name="idDocument"></param>
        /// <param name="documentNumber"></param>
        public void Refresh(string idDocument, string documentNumber)
        {
            // Impostazione parametri relativi al documento corrente
            this.IDDocument        = this.documentId.Value = idDocument;
            this.DocumentNumber    = this.documentNumber.Value = documentNumber;
            this.hdnFilePath.Value = CheckOutFilePath;
            this.isSigned.Value    = IsSignedFile.ToString();
            // Registrazione eventi javascript
            this.RegisterClientScriptEvents();

            //bool fileExist = false;
            //if (string.IsNullOrEmpty(UIManager.FileManager.getSelectedFile().fileSize))
            //fileExist = true;
            // Verifica se l'utente è abilitato all'utilizzo della funzione

            // Inizializzazione del contesto di checkout per il documento corrente
            CheckInOutServices.InitializeContext();
            this.ViewState["IsUserEnabled"] = true;

            this.ViewState["LastAcquiredDocumentExtension"] = null;
            this.fileExt.Value = LastAcquiredDocumentExtension;
            this.pnlFileExtValue.Update();
            this.CheckInOutController.UpdateCheckOutPath();
        }
Пример #5
0
        /// <summary>
        /// Inizializzazione pannello checkinout
        /// </summary>
        /// <param name="idDocument"></param>
        /// <param name="documentNumber"></param>
        public void Initialize(string idDocument, string documentNumber)
        {
            if (!this.IsPostBack)
            {
                // Impostazione parametri relativi al documento corrente
                this.IDDocument     = idDocument;
                this.DocumentNumber = documentNumber;

                // Registrazione eventi javascript
                this.RegisterClientScriptEvents();

                bool fileExist = false;
                if (string.IsNullOrEmpty(UIManager.FileManager.getSelectedFile().fileSize))
                {
                    fileExist = true;
                }
                // Verifica se l'utente è abilitato all'utilizzo della funzione
                if (this.UserEnabled && fileExist)
                {
                    // Inizializzazione del contesto di checkout per il documento corrente
                    CheckInOutServices.InitializeContext();
                }
            }
        }