Ejemplo n.º 1
0
        private static void EseguiTrasmissioni(TrasmissioneVO trasmInfo, List <SchedaDocumento> docs, InfoUtente infoUtente, Ruolo ruolo)
        {
            TrasmissioneBuilder trasmBuilder = new TrasmissioneBuilder(infoUtente, ruolo, trasmInfo);

            foreach (SchedaDocumento doc in docs)
            {
                Trasmissione trasm = trasmBuilder.BuildTrasmissione(doc.InfoDocumento);
                logger.Debug("Salvataggio trasmissione...");
                trasm = TrasmManager.saveTrasmMethod(trasm);
                logger.Debug("Esecuzione trasmissione con id " + trasm.systemId);
                ExecTrasmManager.executeTrasmMethod("", trasm);
            }
        }
Ejemplo n.º 2
0
        public TrasmissioneBuilder(InfoUtente infoUtente, Ruolo ruoloMittente, TrasmissioneVO trasmInfo)
        {
            this._trasmInfo     = trasmInfo;
            this._mittente      = UserManager.getUtente(infoUtente.idPeople);
            this._ruoloMittente = ruoloMittente;
            this._mittenteIU    = infoUtente;
            this._ragione       = RagioniManager.getRagioneByCodice(_mittente.idAmministrazione, _trasmInfo.Ragione);
            logger.Debug("Ricerca corrispondente con codice " + trasmInfo.CodiceCorrispondente);
            Corrispondente destinatario = UserManager.getCorrispondenteByCodRubrica(trasmInfo.CodiceCorrispondente, TipoUtente.INTERNO, infoUtente);

            if (destinatario == null)
            {
                logger.Debug("Corrispondente non trovato");
                throw new Exception();
            }
            _tsStrategy = TrasmissioneSingolaStrategy.GetStrategy(destinatario, this);
        }