public Contact(Int32?id, Core.Database.Contact contact) { this.Id = id; if (contact != null) { this.Name = contact.LastName + ", " + contact.FirstName; if (contact.AgencyNameId.HasValue) { this.Company = contact.Agency.NameCompany; } } }
public String GetName(Core.Database.Contact contact) { String result = ""; if (!String.IsNullOrEmpty(contact.Salutation)) { result += contact.Salutation + " "; } if (!String.IsNullOrEmpty(contact.MiddleName)) { result += contact.FirstName + " " + contact.MiddleName + " " + contact.LastName; } else { result += contact.FirstName + " " + contact.LastName; } return(result); }
public String GetContactSityStateZip(Core.Database.Contact contact) { String result = String.Empty; if (!String.IsNullOrEmpty(contact.City)) { result += ", " + contact.City; } if (!String.IsNullOrEmpty(contact.State)) { result += ", " + contact.State; } if (!String.IsNullOrEmpty(contact.Zip)) { result += " " + contact.Zip; } return(result); }
public String GetAddress(Core.Database.Contact contact) { String result = contact.Address1; if (!String.IsNullOrEmpty(contact.Address2)) { result += ", " + contact.Address2; } if (!String.IsNullOrEmpty(contact.City)) { result += ", " + contact.City; } if (!String.IsNullOrEmpty(contact.State)) { result += ", " + contact.State; } if (!String.IsNullOrEmpty(contact.Zip)) { result += " " + contact.Zip; } return(result); }