Ejemplo n.º 1
0
        public EntityContact Copy()
        {
            Server.Application.EntityContact serverObject = (Server.Application.EntityContact)ToServerObject();

            EntityContact copiedObject = new EntityContact(application, serverObject);

            return(copiedObject);
        }
Ejemplo n.º 2
0
        public override Object ToServerObject()
        {
            Server.Application.EntityContact serverObject = new Server.Application.EntityContact();

            MapToServerObject(serverObject);

            return(serverObject);
        }
Ejemplo n.º 3
0
        public virtual void MapToServerObject(Server.Application.EntityContact serverObject)
        {
            base.MapToServerObject((Server.Application.CoreObject)serverObject);


            serverObject.EntityId = entityId;

            serverObject.EntityContactInformationId = entityContactInformationId;


            serverObject.RelatedEntityId = relatedEntityId;

            serverObject.RelatedObjectType = relatedObjectType;

            serverObject.RelatedObjectId = relatedObjectId;

            serverObject.ScriptEntityFormId = scriptEntityFormId;


            serverObject.DataSource = dataSource;

            serverObject.ContactDate = contactDate;

            serverObject.Direction = direction;

            serverObject.ContactType = contactType;

            serverObject.Successful = successful;

            serverObject.ContactOutcome = ContactOutcome;


            serverObject.ContactRegardingId = contactRegardingId;

            serverObject.Regarding = regarding;

            serverObject.Remarks = remarks;

            serverObject.ContactedByName = contactedByName;


            return;
        }
Ejemplo n.º 4
0
        protected void BaseConstructor(Application applicationReference, Server.Application.EntityContact serverEntityContact)
        {
            base.BaseConstructor(applicationReference, serverEntityContact);


            entityId = serverEntityContact.EntityId;

            entityContactInformationId = serverEntityContact.EntityContactInformationId;


            relatedEntityId = serverEntityContact.RelatedEntityId;

            relatedObjectType = serverEntityContact.RelatedObjectType;

            relatedObjectId = serverEntityContact.RelatedObjectId;

            scriptEntityFormId = serverEntityContact.ScriptEntityFormId;


            dataSource = serverEntityContact.DataSource;

            contactDate = serverEntityContact.ContactDate;

            direction = serverEntityContact.Direction;

            contactType = serverEntityContact.ContactType;

            successful = serverEntityContact.Successful;

            contactOutcome = serverEntityContact.ContactOutcome;


            contactRegardingId = serverEntityContact.ContactRegardingId;

            regarding = serverEntityContact.Regarding;

            remarks = serverEntityContact.Remarks;

            contactedByName = serverEntityContact.ContactedByName;

            return;
        }
Ejemplo n.º 5
0
 public EntityContactEventArgs(Server.Application.EntityContact forEntityContact)
 {
     entityContact = forEntityContact; return;
 }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
        public EntityContact(Application applicationReference, Server.Application.EntityContact serverEntityContact)
        {
            BaseConstructor(applicationReference, serverEntityContact);

            return;
        }