private DocsPaVO.documento.SchedaDocumento creaSchedaDocumento(string idRegistro, string Oggetto, string note, DocsPaVO.documento.SchedaDocumento schedaDoc) { #region campi scheda costanti schedaDoc.systemId = null; schedaDoc.privato = "0"; //doc non privato schedaDoc.idPeople = this._utente.idPeople; schedaDoc.userId = this._utente.userId; schedaDoc.typeId = "LETTERA"; schedaDoc.appId = "ACROBAT"; #endregion campi scheda costanti #region carica registro DocsPaVO.utente.Registro registro = new DocsPaVO.utente.Registro(); registro = this._ws.GetRegistroBySistemId(idRegistro); schedaDoc.registro = registro; #endregion carica registro #region crea oggetto scheda schedaDoc.oggetto = new DocsPaVO.documento.Oggetto(); schedaDoc.oggetto.descrizione = Oggetto; #endregion crea oggetto scheda #region crea note scheda if (!string.IsNullOrEmpty(note)) { DocsPaVO.utente.InfoUtente infoUtente = getInfoUtente(); string idPeopleDelegato = ""; if (infoUtente.delegato != null) { idPeopleDelegato = infoUtente.delegato.idPeople; } DocsPaVO.Note.InfoNota nota = new DocsPaVO.Note.InfoNota(note.Replace("'", "''"), this._utente.systemId, this._ruolo.systemId, idPeopleDelegato); schedaDoc.noteDocumento = new System.Collections.Generic.List <DocsPaVO.Note.InfoNota>() { nota }; } #endregion crea note scheda return(schedaDoc); }
private static void addNota(DocsPaVO.utente.InfoUtente infoUtente, DocsPaVO.documento.SchedaDocumento schedaDoc, string identificativo_Invio) { DocsPaVO.Note.AssociazioneNota oggettoAssociato = new DocsPaVO.Note.AssociazioneNota(); oggettoAssociato.TipoOggetto = DocsPaVO.Note.AssociazioneNota.OggettiAssociazioniNotaEnum.Documento; oggettoAssociato.Id = schedaDoc.systemId; DocsPaVO.Note.InfoNota new_note = new DocsPaVO.Note.InfoNota(); new_note.TipoVisibilita = DocsPaVO.Note.TipiVisibilitaNotaEnum.Tutti; new_note.Testo = identificativo_Invio; new_note.DataCreazione = System.DateTime.Now; new_note.UtenteCreatore = new DocsPaVO.Note.InfoUtenteCreatoreNota(); new_note.UtenteCreatore.IdUtente = infoUtente.idPeople; new_note.UtenteCreatore.DescrizioneUtente = infoUtente.userId; new_note.UtenteCreatore.IdRuolo = infoUtente.idGruppo; //invoiceName_note.UtenteCreatore.DescrizioneRuolo = ruolo.descrizione; DocsPaVO.Note.InfoNota invoiceName_note = BusinessLogic.Note.NoteManager.InsertNota(infoUtente, oggettoAssociato, new_note); schedaDoc.noteDocumento.Insert(0, invoiceName_note); }