예제 #1
0
        private bool ChangeRepertorioState(String counterId, String adminId, String registryId, String rfId, String counterDescription, String webServiceUrl)
        {
            bool changeStateResult = false;

            try
            {
                changeStateResult = base.GetWebServiceInstance(webServiceUrl).ChangeRepertorioState(
                    new ChangeRepertorioStateRequest()
                {
                    CounterId  = counterId,
                    IdAmm      = adminId,
                    RegistryId = registryId,
                    RfId       = rfId
                }).ChangeStateResult;
            }
            catch (Exception e)
            {
                // Recupero eccezione interna
                Exception ex = SoapExceptionParser.GetOriginalException(e);

                //EventLog.WriteEntry("AutomaticPrintService", String.Format("Cambio stato repertorio {0}: {1}", counterDescription, ex.Message), EventLogEntryType.Error);
                Log.WriteLine(DateTime.Now + String.Format(" [ERROR] Errore nel cambio stato repertorio {0}: {1}", counterDescription, ex.Message));
            }

            return(changeStateResult);
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="counterId"></param>
        /// <param name="registryId"></param>
        /// <param name="rfId"></param>
        /// <param name="printerRole"></param>
        /// <param name="userInfo"></param>
        /// <param name="counterDescription"></param>
        /// <param name="webSericeUrl"></param>
        private void GenerateDocument(String counterId, String registryId, String rfId, Ruolo printerRole, InfoUtente userInfo, String counterDescription, String webSericeUrl)
        {
            try
            {
                GeneratePrintRepertorioResponse response = base.GetWebServiceInstance(webSericeUrl).GeneratePrintRepertorio(new GeneratePrintRepertorioRequest()
                {
                    CounterId  = counterId,
                    RegistryId = registryId,
                    RfId       = rfId,
                    Role       = printerRole,
                    UserInfo   = userInfo
                });
            }
            catch (Exception e)
            {
                // Recupero eccezione interna
                Exception ex = SoapExceptionParser.GetOriginalException(e);

                // Logging dell'eccezione originale
                //EventLog.WriteEntry("AutomaticPrintService", String.Format("Errore creazione documento per repertorio {0}: {1}", counterDescription, ex.Message), EventLogEntryType.Error);

                Log.WriteLine(DateTime.Now + String.Format(" [ERROR] Errore creazione documento per repertorio {0}: {1}", counterDescription, ex.Message));
            }
        }