Beispiel #1
0
        public EntityContactModel(Mercury.Client.Core.Entity.Entity forEntity)
        {
            entity = forEntity;

            InitializeEntityContactInformations();

            return;
        }
        protected void HandleWorkflowResponse_ContactEntity()
        {
            Server.Application.WorkflowUserInteractionRequestContactEntity contactEntityRequest;

            contactEntityRequest = (Server.Application.WorkflowUserInteractionRequestContactEntity)WorkflowResponse.UserInteractionRequest;


            if (contactEntityRequest.Entity == null)
            {
                // NO ENTITY SPECIFIED FOR CONTACT - ERROR

                SetException("Contact Entity Request has no Entity assigned to it to contact. Unable to continue.");

                return;
            }


            entity = new Client.Core.Entity.Entity(MercuryApplication, contactEntityRequest.Entity);

            entityContactModel = new Controls.EntityContactModel(contactEntityRequest.Entity, contactEntityRequest.RelatedEntity);

            entityContactModel.StoreModelStateInMemory = StoreModelStateInMemory;

            entityContactModel.AllowEditContactDateTime = contactEntityRequest.AllowEditContactDateTime;

            entityContactModel.AllowCancel = contactEntityRequest.AllowCancel;

            entityContactModel.AllowEditRegarding = contactEntityRequest.AllowEditRegarding;

            entityContactModel.AllowEditRelatedEntity = contactEntityRequest.AllowEditRelatedEntity;

            entityContactModel.Attempt = contactEntityRequest.Attempt;

            entityContactModel.IntroductionScript = contactEntityRequest.IntroductionScript;

            entityContactModel.ContactRegarding = contactEntityRequest.Regarding;


            switch (entity.EntityType)
            {
            case Server.Application.EntityType.Member:

                WorkflowControlResponseScript = "WorkQueueItemInformation_SetMember ('" + Member.Id + "');";

                break;
            }



            workflowControl = "/Views/Workflow/WorkflowControls/ContactEntity.cshtml";

            //contactEntityControl.ResponseScript = ResponseScriptWorkflowContinue;

            return;
        }
Beispiel #3
0
        public EntityContactModel(Mercury.Server.Application.Entity forServerEntity, Mercury.Server.Application.Entity forServerRelatedEntity)
        {
            entity = new Client.Core.Entity.Entity(MercuryApplication, forServerEntity);

            if (forServerRelatedEntity != null)
            {
                relatedEntity = new Client.Core.Entity.Entity(MercuryApplication, forServerRelatedEntity);
            }

            InitializeEntityContactInformations();

            return;
        }
        public WorkflowModel(System.Collections.Specialized.NameValueCollection form) : base(form)
        {
            // CREATE MODEL AND RESTORE STATE FROM REQUEST FORM

            UrlOriginal = form["UrlOriginal"];

            UrlReferrer = form["UrlReferrer"];


            Int64.TryParse(form["WorkflowId"], out workflowId);

            WorkflowId = workflowId; // SELF REFERENCE TO FORCE UPDATE

            Guid.TryParse(form["WorkflowInstanceId"], out workflowInstanceId);

            Int64.TryParse(form["WorkQueueItemId"], out workQueueItemId);

            WorkQueueItemId = workQueueItemId; // SELF REFERENCE TO FORCE UPDATE


            workflowTitle = form["WorkflowTitle"];

            workflowActionMessage = form["WorkflowActionMessage"];

            lastWorkflowMessage = form["LastWorkflowMessage"];


            WorkflowControl = form["WorkflowControl"];


            Int64 entityId = 0;

            Int64.TryParse(form["Entity.Id"], out entityId);

            entity = MercuryApplication.EntityGet(entityId, true);


            UpdateValues(form);

            return;
        }
Beispiel #5
0
        public EntityContactModel(System.Collections.Specialized.NameValueCollection form)
        {
            // RESTORE STATE FROM WEB FORM

            Int64 entityId = 0;

            Int64.TryParse(form["EntityContactModel.Entity.Id"], out entityId);

            entity = MercuryApplication.EntityGet(entityId, true);


            Int64 relatedEntityId = 0;

            Int64.TryParse(form["EntityContactModel.RelatedEntity.Id"], out relatedEntityId);

            relatedEntity = MercuryApplication.EntityGet(relatedEntityId, true);


            Boolean.TryParse(form["EntityContactModel.AllowCancel"], out allowCancel);

            Boolean.TryParse(form["EntityContactModel.AllowEditContactDateTime"], out allowEditContactDateTime);

            Boolean.TryParse(form["EntityContactModel.AllowEditRegarding"], out allowEditRegarding);

            Boolean.TryParse(form["EntityContactModel.AllowEditRelatedEntity"], out allowEditRelatedEntity);


            Int32.TryParse(form["EntityContactModel.Attempt"], out attempt);

            ContactRemarks = form["EntityContactModel.ContactRemarks"];

            IntroductionScript = form["EntityContactModel.IntroductionScript"];


            UpdateValues(form);

            return;
        }