public object PostAddEditFormDesign(PostAddEditFormDesignDTO model) { using (DynamicFormService dynamicFormService = new DynamicFormService()) { sysBpmsDynamicForm dynamicForm = dynamicFormService.GetInfo(model.DynamicFormId); if (dynamicForm != null) { ResultOperation resultOperation = dynamicForm.Update(model.DesignJson); if (!resultOperation.IsSuccess) { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } resultOperation = dynamicFormService.GetSourceCode(dynamicForm); if (!resultOperation.IsSuccess) { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } resultOperation = dynamicFormService.Update(dynamicForm, base.userName); if (resultOperation.IsSuccess) { return(new PostMethodMessage(SharedLang.Get("Success.Text"), DisplayMessageType.success)); } else { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } } else { return(new PostMethodMessage(SharedLang.Get("NotFound.Text"), DisplayMessageType.error)); } } }