public static RagioneDest[] addToArrayRagioneDest(RagioneDest[] array, RagioneDest nuovoElemento) { try { RagioneDest[] nuovaLista; if (array != null) { int len = array.Length; nuovaLista = new RagioneDest[len + 1]; array.CopyTo(nuovaLista, 0); nuovaLista[len] = nuovoElemento; return(nuovaLista); } else { nuovaLista = new RagioneDest[1]; nuovaLista[0] = nuovoElemento; return(nuovaLista); } } catch (System.Exception ex) { UIManager.AdministrationManager.DiagnosticError(ex); return(null); } }
private void init() { _trasm = new Trasmissione(); _trasm.noteGenerali = _modello.VAR_NOTE_GENERALI; if (_isDoc) { _trasm.infoDocumento = BusinessLogic.Documenti.DocManager.GetInfoDocumento(_infoUtente, _id, null); _trasm.tipoOggetto = TipoOggetto.DOCUMENTO; } else { Fascicolo fasc = BusinessLogic.Fascicoli.FascicoloManager.getFascicoloById(_id, _infoUtente); _trasm.infoFascicolo = this.getInfoFascicoloDaFascicolo(fasc); _trasm.tipoOggetto = TipoOggetto.FASCICOLO; } _trasm.utente = BusinessLogic.Utenti.UserManager.getUtente(_infoUtente.idPeople); //aggiunta delegato if (_infoUtente.delegato != null) { _trasm.delegato = _infoUtente.delegato.idPeople; } _trasm.ruolo = _ruolo; _trasm.NO_NOTIFY = _modello.NO_NOTIFY; TrasmSingoleBuilder trasmSingoleBuilder = new TrasmSingoleBuilder(_infoUtente, _ruolo, _modello); for (int i = 0; i < _modello.RAGIONI_DESTINATARI.Count; i++) { RagioneDest ragDest = (RagioneDest)_modello.RAGIONI_DESTINATARI[i]; ArrayList destinatari = new ArrayList(ragDest.DESTINATARI); for (int j = 0; j < destinatari.Count; j++) { MittDest mittDest = (MittDest)destinatari[j]; Corrispondente corr = getCorrispondente(mittDest); if (corr != null) { RagioneTrasmissione ragione = BusinessLogic.Trasmissioni.QueryTrasmManager.getRagioneById("" + mittDest.ID_RAGIONE); trasmSingoleBuilder.addTrasmSingole(corr, ragione, mittDest.VAR_NOTE_SING, mittDest.CHA_TIPO_TRASM, mittDest.SCADENZA); } } } _trasm.trasmissioniSingole = trasmSingoleBuilder.TrasmissioniSingole; }