private void BuildBaseResult(DataRow row, IndexedContact ic) { ContactIdentificationLevel result; if (!Enum.TryParse(ic.IdentificationLevel, true, out result)) { result = ContactIdentificationLevel.None; } row[Schema.ContactIdentificationLevel.Name] = result; row[Schema.ContactId.Name] = ic.ContactId; row[Schema.FirstName.Name] = ic.FirstName; row[Schema.MiddleName.Name] = ic.MiddleName; row[Schema.Surname.Name] = ic.Surname; row[Schema.EmailAddress.Name] = ic.PreferredEmail; row[Schema.Value.Name] = ic.Value; row[Schema.VisitCount.Name] = ic.VisitCount; row[Schema.ValuePerVisit.Name] = Calculator.GetAverageValue(ic.Value, ic.VisitCount); }
/// <summary> /// Method that creates a list of indexable Contacts /// </summary> /// <returns>List<IndexableSubEntrepeneur></returns> private List <IndexedContact> GetIndexableContacts() { List <IndexedContact> result = new List <IndexedContact>(); IndexedContact iContact = new IndexedContact(0, Bizz.Contacts[0]); result.Add(iContact); int i = 1; foreach (Contact contact in Bizz.Contacts) { if (contact.LegalEntity.Id == Bizz.TempLegalEntity.Id) { IndexedContact temp = new IndexedContact(i, contact); result.Add(temp); i++; } } return(result); }
private IContactSearchResult BuildBaseResult(IndexedContact indexedContact) { ContactIdentificationLevel result; if (!Enum.TryParse(indexedContact.IdentificationLevel, true, out result)) { result = ContactIdentificationLevel.None; } return(new ContactSearchResult() { IdentificationLevel = (int)result, ContactId = indexedContact.ContactId, FirstName = indexedContact.FirstName, MiddleName = indexedContact.MiddleName, Surname = indexedContact.Surname, PreferredEmail = indexedContact.PreferredEmail, JobTitle = indexedContact.JobTitle, Value = indexedContact.Value, VisitCount = indexedContact.VisitCount }); }