/// <summary> /// Ricerca valore del documento nelle chiavi predefinite /// </summary> /// <param name="key"></param> /// <param name="pairs"></param> /// <returns></returns> private static string FindDocumentValue(string key, DocsPaVO.Modelli.ModelKeyValuePair[] pairs) { DocsPaVO.Modelli.ModelKeyValuePair pair = pairs.Where(e => e.Key == key).FirstOrDefault(); if (pair != null) { return(pair.Value); } else { return(string.Empty); } }
protected override DocsPaVO.Modelli.ModelKeyValuePair[] GetModelKeyValuePairs(DocsPaVO.utente.InfoUtente infoUtente, DocsPaVO.documento.SchedaDocumento schedaDocumento) { ArrayList listaCampi = this.GetOggettiProfilazione(schedaDocumento.docNumber, infoUtente.idAmministrazione, schedaDocumento.tipologiaAtto.descrizione); base.FetchCommonFields(listaCampi, infoUtente, schedaDocumento); List <DocsPaVO.Modelli.ModelKeyValuePair> list = new List <DocsPaVO.Modelli.ModelKeyValuePair>(); foreach (string[] items in listaCampi) { DocsPaVO.Modelli.ModelKeyValuePair pair = new DocsPaVO.Modelli.ModelKeyValuePair(); pair.Key = items[0]; pair.Value = items[1]; list.Add(pair); } return(list.ToArray()); }
/// <summary> /// /// </summary> /// <param name="infoUtente"></param> /// <param name="schedaDocumento"></param> /// <param name="pathModello"></param> protected override DocsPaVO.Modelli.ModelKeyValuePair[] GetModelKeyValuePairs(DocsPaVO.utente.InfoUtente infoUtente, DocsPaVO.documento.SchedaDocumento schedaDocumento) { ArrayList listaOggetti = new ArrayList(); this.FetchCommonFields(listaOggetti, infoUtente, schedaDocumento); List <DocsPaVO.Modelli.ModelKeyValuePair> list = new List <DocsPaVO.Modelli.ModelKeyValuePair>(); foreach (string[] items in listaOggetti) { DocsPaVO.Modelli.ModelKeyValuePair pair = new DocsPaVO.Modelli.ModelKeyValuePair(); pair.Key = items[0]; pair.Value = items[1]; list.Add(pair); } return(list.ToArray()); }