public EntityContactInformation Copy() { Server.Application.EntityContactInformation serverEntityContactInformation = (Server.Application.EntityContactInformation)ToServerObject(); EntityContactInformation copiedEntityContactInformation = new EntityContactInformation(application, serverEntityContactInformation); return(copiedEntityContactInformation); }
public override Object ToServerObject() { Server.Application.EntityContactInformation serverEntityContactInformation = new Server.Application.EntityContactInformation(); MapToServerObject(serverEntityContactInformation); return(serverEntityContactInformation); }
public virtual void MapToServerObject(Server.Application.EntityContactInformation serverEntityContactInformation) { base.MapToServerObject((Server.Application.CoreObject)serverEntityContactInformation); serverEntityContactInformation.EntityId = entityId; serverEntityContactInformation.ContactType = contactType; serverEntityContactInformation.ContactSequence = contactSequence; serverEntityContactInformation.Number = number; serverEntityContactInformation.NumberExtension = numberExtension; serverEntityContactInformation.Email = email; serverEntityContactInformation.EffectiveDate = effectiveDate; serverEntityContactInformation.TerminationDate = terminationDate; return; }
protected void BaseConstructor(Application applicationReference, Server.Application.EntityContactInformation serverEntityContactInformation) { base.BaseConstructor(applicationReference, serverEntityContactInformation); entityId = serverEntityContactInformation.EntityId; contactType = serverEntityContactInformation.ContactType; contactSequence = serverEntityContactInformation.ContactSequence; number = serverEntityContactInformation.Number; numberExtension = serverEntityContactInformation.NumberExtension; email = serverEntityContactInformation.Email; effectiveDate = serverEntityContactInformation.EffectiveDate; terminationDate = serverEntityContactInformation.TerminationDate; return; }
public EntityContactInformation(Application applicationReference, Server.Application.EntityContactInformation serverEntityContactInformation) { BaseConstructor(applicationReference, serverEntityContactInformation); return; }
private void ButtonOk_Click(object sender, RoutedEventArgs e) { SetValidationMessage(String.Empty); if (String.IsNullOrEmpty(ContactRegardingSelection.Text)) { SetValidationMessage("** Contact Regarding is a required field."); return; } if ((!ContactDate.SelectedDate.HasValue) || (!ContactTime.SelectedTime.HasValue)) { SetValidationMessage("** Contact Date/Time is a required field."); return; } // TODO: VALIDATE NOT FUTURE DATE/TIME if (EntityContactInformationGrid.SelectedItem == null) { SetValidationMessage("** Contact Method is a required selection."); return; } Server.Application.EntityContactInformation selectedInformation = (Server.Application.EntityContactInformation)EntityContactInformationGrid.SelectedItem; entityContactInstance = new Mercury.Server.Application.EntityContact(); entityContactInstance.EntityId = Entity.Id; entityContactInstance.EntityContactInformationId = selectedInformation.Id; entityContactInstance.ContactDate = ContactDate.SelectedDate.Value; entityContactInstance.ContactedByName = MercuryApplication.Session.UserDisplayName; entityContactInstance.ContactType = selectedInformation.ContactType; entityContactInstance.Direction = (Mercury.Server.Application.ContactDirection)Convert.ToInt32(((FrameworkElement)ContactDirectionSelection.SelectedItem).Tag); entityContactInstance.Regarding = ContactRegardingSelection.Text; entityContactInstance.Remarks = ContactRemarks.Text; entityContactInstance.Successful = (Convert.ToInt32(((FrameworkElement)ContactOutcomeSelection.SelectedItem).Tag) == 1); entityContactInstance.ContactOutcome = (Mercury.Server.Application.ContactOutcome)Convert.ToInt32(((FrameworkElement)ContactOutcomeSelection.SelectedItem).Tag); if (Contact != null) { Contact(this, new EntityContactEventArgs(entityContactInstance)); } return; }