Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="infoUtente"></param>
        /// <param name="idConservazione"></param>
        private static void EliminaVerifica(DocsPaVO.utente.InfoUtente infoUtente, string idConservazione)
        {
            string key = GetDictKey(infoUtente, idConservazione);

            if (_command.ContainsKey(key))
            {
                VerificaSupportoRemoto cmd = new VerificaSupportoRemoto(infoUtente, idConservazione);

                if (cmd._statoVerifica.Percentuale == 100)
                {
                    _command.Remove(key);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="infoUtente"></param>
        /// <param name="idConservazione"></param>
        /// <returns></returns>
        public static StatoVerificaSupporto GetStatoVerifica(DocsPaVO.utente.InfoUtente infoUtente, string idConservazione)
        {
            StatoVerificaSupporto stato = null;

            string key = GetDictKey(infoUtente, idConservazione);

            if (_command.ContainsKey(key))
            {
                VerificaSupportoRemoto itm = _command[key];

                stato = itm._statoVerifica;
            }

            return(stato);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Esecuzione del task di verifica integrità del supporto remoto
        /// </summary>
        /// <param name="infoUtente"></param>
        /// <param name="idConservazione"></param>
        public static void IniziaVerifica(DocsPaVO.utente.InfoUtente infoUtente, string idConservazione)
        {
            string key = GetDictKey(infoUtente, idConservazione);

            if (!_command.ContainsKey(key))
            {
                VerificaSupportoRemoto cmd = new VerificaSupportoRemoto(infoUtente, idConservazione);

                _command.Add(key, cmd);

                // Avvio task di verifica asincrono
                IniziaVerificaSupportoDelegate del = new IniziaVerificaSupportoDelegate(cmd.IniziaVerificaSupporto);
                IAsyncResult result = del.BeginInvoke(new AsyncCallback(cmd.IniziaVerificaSupportoExecuted), cmd);
            }
            else
            {
                // Task di verifica già iniziato
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="result"></param>
        private void IniziaVerificaSupportoExecuted(IAsyncResult result)
        {
            //string esito ="0";
            DocsPaVO.Logger.CodAzione.Esito logResponse = DocsPaVO.Logger.CodAzione.Esito.KO;

            if (result.IsCompleted)
            {
                VerificaSupportoRemoto cmd = (VerificaSupportoRemoto)result.AsyncState;

                // Notifica trasmissione al mittente
                DocsPaConsManager consManager = new DocsPaConsManager();

                if (cmd._statoVerifica.Esito)
                {
                    bool ret = consManager.TrasmettiNotifica(this._infoUtente, this._idConservazione);
                    //logResponse = DocsPaVO.Logger.CodAzione.Esito.OK;
                    //esito = "1";
                }
            }
        }