override public void MapDataFields(System.Data.DataRow currentRow) { base.MapDataFields(currentRow); entityId = (Int64)currentRow["EntityId"]; entityContactInformationId = base.IdFromSql(currentRow, "EntityContactInformationId"); relatedEntityId = base.IdFromSql(currentRow, "RelatedEntityId"); relatedObjectType = (String)currentRow["RelatedObjectType"]; relatedObjectId = (Int64)currentRow["RelatedObjectId"]; scriptEntityFormId = base.IdFromSql(currentRow, "ScriptEntityFormId"); dataSource = (String)currentRow["DataSource"]; contactDate = (DateTime)currentRow["ContactDate"]; direction = (Mercury.Server.Core.Enumerations.ContactDirection)(Int32) currentRow["ContactDirection"]; contactType = (Mercury.Server.Core.Enumerations.EntityContactType)(Int32) currentRow["ContactType"]; successful = (Boolean)currentRow["Successful"]; if (currentRow.Table.Columns.Contains("ContactOutcome")) { contactOutcome = (Mercury.Server.Core.Enumerations.ContactOutcome)(Int32) currentRow["ContactOutcome"]; } else if (currentRow.Table.Columns.Contains("ContactOutcomeId")) { contactOutcome = (Mercury.Server.Core.Enumerations.ContactOutcome)(Int32) currentRow["ContactOutcomeId"]; } contactRegardingId = base.IdFromSql(currentRow, "ContactRegardingId"); regarding = (String)currentRow["Regarding"]; remarks = (String)currentRow["Remarks"]; contactedByName = (String)currentRow["ContactedByName"]; return; } // MapDataFields (System.Data.DataRow currentRow)
public EntityContactInformation CurrentContactInformation(Enumerations.EntityContactType forContactType) { EntityContactInformation contactInformation = null; foreach (EntityContactInformation currentContactInformation in ContactInformations) { if (currentContactInformation.ContactType == forContactType) { if ((DateTime.Today >= currentContactInformation.EffectiveDate) && (DateTime.Today <= currentContactInformation.TerminationDate)) { contactInformation = currentContactInformation; break; } } } return(contactInformation); }
public override void MapDataFields(System.Data.DataRow currentRow) { base.MapDataFields(currentRow); entityId = (Int64)currentRow["EntityId"]; contactType = (Mercury.Server.Core.Enumerations.EntityContactType)(Int32) currentRow["ContactType"]; contactSequence = (Int32)currentRow["ContactSequence"]; number = (String)currentRow["ContactNumber"]; numberExtension = (String)currentRow["ContactExtension"]; email = (String)currentRow["ContactEmail"]; effectiveDate = (DateTime)currentRow["EffectiveDate"]; terminationDate = (DateTime)currentRow["TerminationDate"]; return; } // MapDataFields (System.Data.DataRow currentRow)