public void CustomFormSave(WorkFlowFormViewModel formData) { IWorkFlowForm form = GetWorkFlowForm(formData.ProcessFormViewViewName); if (form != null) { form.Save(formData); } }
public bool CustomFormValidate(WorkFlowFormViewModel formData, ModelStateDictionary modelState) { IWorkFlowForm form = GetWorkFlowForm(formData.ProcessFormViewViewName); if (form != null) { return(form.Validate(formData, modelState)); } return(true); }
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); }
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); }