Exemplo n.º 1
0
        public void CustomFormSave(WorkFlowFormViewModel formData)
        {
            IWorkFlowForm form = GetWorkFlowForm(formData.ProcessFormViewViewName);

            if (form != null)
            {
                form.Save(formData);
            }
        }
Exemplo n.º 2
0
        public bool CustomFormValidate(WorkFlowFormViewModel formData, ModelStateDictionary modelState)
        {
            IWorkFlowForm form = GetWorkFlowForm(formData.ProcessFormViewViewName);

            if (form != null)
            {
                return(form.Validate(formData, modelState));
            }
            return(true);
        }
Exemplo n.º 3
0
        public WorkFlowFormViewModel WorkFlowFormLoad(WorkFlowFormViewModel workFlowFormViewModel)
        {
            WorkFlowFormViewModel workFlowForm = workFlowFormViewModel;

            if (workFlowFormViewModel.ProcessFormViewViewName != null && workFlowFormViewModel.ProcessFormViewCompleted)
            {
                IWorkFlowForm form = GetWorkFlowForm(workFlowFormViewModel.ProcessFormViewViewName);
                if (form != null)
                {
                    workFlowForm = form.Load(workFlowFormViewModel);
                }
            }
            return(workFlowForm);
        }
Exemplo n.º 4
0
        private IWorkFlowForm GetWorkFlowForm(string formViewName)
        {
            IWorkFlowForm form = null;

            if (formViewName != null && !workFlowFormList.TryGetValue(formViewName, out form))
            {
                Type type = Type.GetType("WorkFlowManager.Services.CustomForms." + formViewName + ", WorkFlowManager.Services");

                var formObject = DependencyResolver.Current.GetService(type);
                if (formObject != null)
                {
                    workFlowFormList.Add(formViewName, (IWorkFlowForm)formObject);

                    form = (IWorkFlowForm)formObject;
                }
            }
            return(form);
        }