internal static AddresseeType TryParsEnumAddressee(string p) { AddresseeType type = AddresseeType.UNDEFINED; Enum.TryParse(p, out type); return(type); }
public MailRefs(String addresseMail, AddresseeType addrclass) { this.IdRef = 0; this.RefIdMail = 0; this.AddresseeMail = addresseMail; this.AddresseeClass = addrclass; }
public MailRefs(MailRefs mr) { if (mr == null) { return; } this.MailDestinatario = mr.MailDestinatario; this.TipoRef = mr.TipoRef; }
public void SetMailDestinatari(IEnumerable <ContactsApplicationMapping> rows, AddresseeType addType) { if (rows != null && rows.Count() > 0) { if (this.RubricaEntitaUsed == null) { this.RubricaEntitaUsed = new List <RubrEntitaUsed>(); } try { rows.Select(cnt => { RubrEntitaUsed r = new RubrEntitaUsed(); if (cnt.IdContact > 0) { r.IdEntUsed = cnt.IdContact; } else { r.IdEntUsed = null; } r.Mail = cnt.Mail; r.Fax = cnt.Fax; r.Telefono = cnt.Telefono; if (cnt.RefIdReferral > 0) { r.IdReferral = cnt.RefIdReferral; } else { r.IdReferral = null; } r.TipoContatto = addType; return(r); }).ToList().ForEach(re => this.RubricaEntitaUsed.Add(re)); } catch { this.RubricaEntitaUsed = null; } this.AppCode = this.CodAppInserimento = rows.ElementAt(0).AppCode; this.ComCode = rows.ElementAt(0).ComCode; this.RefIdSottotitolo = rows.ElementAt(0).IdSottotitolo; this.Sottotitolo = rows.ElementAt(0).Sottotitolo; this.Titolo = rows.ElementAt(0).Titolo; } }