protected override void OnSave(ISerializationInfo content)
 {
     base.OnSave(content);
     if (!K2Field.IsNullOrEmpty(SmartObjectServer))
     {
         content.SetProperty("SmartObjectServer", SmartObjectServer);
     }
     if (!K2Field.IsNullOrEmpty(CRMFunctionsSmartObject))
     {
         content.SetProperty("CRMFunctionsSmartObject", CRMFunctionsSmartObject);
     }
     if (!K2Field.IsNullOrEmpty(CRMServerURL))
     {
         content.SetProperty("CRMServerURL", CRMServerURL);
     }
     if (!K2Field.IsNullOrEmpty(CRMOrganisation))
     {
         content.SetProperty("CRMOrganisation", CRMOrganisation);
     }
     if (!K2Field.IsNullOrEmpty(CRMEntityId))
     {
         content.SetProperty("CRMEntityId", CRMEntityId);
     }
     if (!K2Field.IsNullOrEmpty(CRMEntityType))
     {
         content.SetProperty("CRMEntityType", CRMEntityType);
     }
     if (!K2Field.IsNullOrEmpty(CustomServiceURL))
     {
         content.SetProperty("CustomServiceURL", CustomServiceURL);
     }
 }
示例#2
0
        protected override void OnSave(ISerializationInfo content)
        {
            base.OnSave(content);

            if (!K2Field.IsNullOrEmpty(_powerShellScript))
            {
                content.SetProperty(POWERSHELLSCRIPT, _powerShellScript);
            }

            if (_inputVariables != null && _inputVariables.Count > 0)
            {
                content.SetListProperty(INPUTVARIABLES, _inputVariables);
            }

            if (_outputVariables != null && _outputVariables.Count > 0)
            {
                content.SetListProperty(OUTPUTVARIABLES, _outputVariables);
            }
        }
        //When your project is saved, this override determines which properties you have defined
        //gets saved and can ba accessed once the project is reopened
        protected override void OnSave(ISerializationInfo content)
        {
            base.OnSave(content);

            if (!string.IsNullOrEmpty(InternetPlatform))
            {
                content.SetProperty("InternetPlatform", InternetPlatform);
            }
            content.SetProperty("InsertSN", InsertSN);
            content.SetProperty("CreateTasks", CreateTasks);

            if (!K2Field.IsNullOrEmpty(SN))
            {
                content.SetProperty("SN", SN);
            }

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

            this.EnsureThatRequiredProcessFieldsExists();
        }