protected override void OnLoad(ISerializationInfo content)
 {
     base.OnLoad(content);
     if (content.HasProperty("CRMServerURL"))
     {
         this.CRMServerURL = (K2Field)content.GetPropertyAsPersistableObject("CRMServerURL");
     }
     if (content.HasProperty("CRMOrganisation"))
     {
         this.CRMOrganisation = (K2Field)content.GetPropertyAsPersistableObject("CRMOrganisation");
     }
     if (content.HasProperty("CRMEntityId"))
     {
         this.CRMEntityId = (K2Field)content.GetPropertyAsPersistableObject("CRMEntityId");
     }
     if (content.HasProperty("CRMEntityType"))
     {
         this.CRMEntityType = (K2Field)content.GetPropertyAsPersistableObject("CRMEntityType");
     }
     if (content.HasProperty("CustomServiceURL"))
     {
         this.CustomServiceURL = (K2Field)content.GetPropertyAsPersistableObject("CustomServiceURL");
     }
     if (content.HasProperty("SmartObjectServer"))
     {
         this.SmartObjectServer = (K2Field)content.GetPropertyAsPersistableObject("SmartObjectServer");
     }
     if (content.HasProperty("CRMFunctionsSmartObject"))
     {
         this.CRMFunctionsSmartObject = (K2Field)content.GetPropertyAsPersistableObject("CRMFunctionsSmartObject");
     }
 }
Beispiel #2
0
        protected override void OnLoad(ISerializationInfo content)
        {
            base.OnLoad(content);

            if (content.HasProperty(POWERSHELLSCRIPT))
            {
                PowerShellScript = (K2Field)content.GetPropertyAsPersistableObject(POWERSHELLSCRIPT);
            }

            if (content.HasProperty(INPUTVARIABLES))
            {
                InputVariables.Clear();
                content.GetListProperty(INPUTVARIABLES, InputVariables);
            }

            if (content.HasProperty(OUTPUTVARIABLES))
            {
                OutputVariables.Clear();
                content.GetListProperty(OUTPUTVARIABLES, OutputVariables);
            }
        }
        //When your wizard page is loaded, this override determines what values exist already and loads those
        //values into the wizard for display. I.e. if you have a value of "123" that was previously entered into a textbox
        //on your wizard, this override will load it into memory and on you Wizard page's "OnActivate", this value
        //can be retrieved and displayed in your text box.
        protected override void OnLoad(ISerializationInfo content)
        {
            base.OnLoad(content);

            if (content.HasProperty("InternetPlatform"))
            {
                _InternetPlatform = content.GetPropertyAsString("InternetPlatform");
            }
            if (content.HasProperty("InsertSN"))
            {
                _InsertSN = content.GetPropertyAsBoolean("InsertSN");
            }
            if (content.HasProperty("CreateTasks"))
            {
                _CreateTasks = content.GetPropertyAsBoolean("CreateTasks");
            }

            if (content.HasProperty("SN"))
            {
                this.SN = (K2Field)content.GetPropertyAsPersistableObject("SN");
            }

            if (content.HasProperty("ActivityName"))
            {
                this.ActivityName = (K2Field)content.GetPropertyAsPersistableObject("ActivityName");
            }
            if (content.HasProperty("ProcessName"))
            {
                this.ProcessName = (K2Field)content.GetPropertyAsPersistableObject("ProcessName");
            }
            if (content.HasProperty("SmartObjectServer"))
            {
                this.SmartObjectServer = (K2Field)content.GetPropertyAsPersistableObject("SmartObjectServer");
            }
            if (content.HasProperty("CRMFunctionsSmartObject"))
            {
                this.CRMFunctionsSmartObject = (K2Field)content.GetPropertyAsPersistableObject("CRMFunctionsSmartObject");
            }
            //if (content.HasProperty("CustomServiceURL"))
            //{
            //    this.CustomServiceURL = (K2Field)content.GetPropertyAsPersistableObject("CustomServiceURL");
            //}
            if (content.HasProperty("CRMServerURL"))
            {
                this.CRMServerURL = (K2Field)content.GetPropertyAsPersistableObject("CRMServerURL");
            }
            if (content.HasProperty("CRMOrganisation"))
            {
                this.CRMOrganisation = (K2Field)content.GetPropertyAsPersistableObject("CRMOrganisation");
            }
            if (content.HasProperty("CRMFormURL"))
            {
                this.CRMFormURL = (K2Field)content.GetPropertyAsPersistableObject("CRMFormURL");
            }
            if (content.HasProperty("CRMEntityId"))
            {
                this.CRMEntityId = (K2Field)content.GetPropertyAsPersistableObject("CRMEntityId");
            }
            if (content.HasProperty("CRMEntityType"))
            {
                this.CRMEntityType = (K2Field)content.GetPropertyAsPersistableObject("CRMEntityType");
            }
            if (content.HasProperty("CRMEntityForm"))
            {
                this.CRMEntityForm = (K2Field)content.GetPropertyAsPersistableObject("CRMEntityForm");
            }
            if (content.HasProperty("CRMCustomSNParameter"))
            {
                this.CRMCustomSNParameter = (K2Field)content.GetPropertyAsPersistableObject("CRMCustomSNParameter");
            }
            if (content.HasProperty("TaskCategory"))
            {
                this.TaskCategory = (K2Field)content.GetPropertyAsPersistableObject("TaskCategory");
            }
            if (content.HasProperty("TaskDescription"))
            {
                this.TaskDescription = (K2Field)content.GetPropertyAsPersistableObject("TaskDescription");
            }
            if (content.HasProperty("TaskDueDate"))
            {
                this.TaskDueDate = (K2Field)content.GetPropertyAsPersistableObject("TaskDueDate");
            }
            if (content.HasProperty("TaskDuration"))
            {
                this.TaskDuration = (K2Field)content.GetPropertyAsPersistableObject("TaskDuration");
            }
            if (content.HasProperty("TaskOwnerFQN"))
            {
                this.TaskOwnerFQN = (K2Field)content.GetPropertyAsPersistableObject("TaskOwnerFQN");
            }
            if (content.HasProperty("TaskOwner"))
            {
                this.TaskOwner = (K2Field)content.GetPropertyAsPersistableObject("TaskOwner");
            }
            if (content.HasProperty("TaskOwnerId"))
            {
                this.TaskOwnerId = (K2Field)content.GetPropertyAsPersistableObject("TaskOwnerId");
            }
            if (content.HasProperty("TaskPriority"))
            {
                this.TaskPriority = (K2Field)content.GetPropertyAsPersistableObject("TaskPriority");
            }
            if (content.HasProperty("TaskRegarding"))
            {
                this.TaskRegarding = (K2Field)content.GetPropertyAsPersistableObject("TaskRegarding");
            }
            if (content.HasProperty("TaskRegardingId"))
            {
                this.TaskRegardingId = (K2Field)content.GetPropertyAsPersistableObject("TaskRegardingId");
            }
            if (content.HasProperty("TaskState"))
            {
                this.TaskState = (K2Field)content.GetPropertyAsPersistableObject("TaskState");
            }
            if (content.HasProperty("TaskStatus"))
            {
                this.TaskStatus = (K2Field)content.GetPropertyAsPersistableObject("TaskStatus");
            }
            if (content.HasProperty("TaskSubcategory"))
            {
                this.TaskSubcategory = (K2Field)content.GetPropertyAsPersistableObject("TaskSubcategory");
            }
            if (content.HasProperty("TaskSubject"))
            {
                this.TaskSubject = (K2Field)content.GetPropertyAsPersistableObject("TaskSubject");
            }

            this.EnsureThatRequiredProcessFieldsExists();
        }