public void SubmitForm(FlowEntity flowEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { flowEntity.Modify(keyValue); service.Update(flowEntity); } else { flowEntity.EnabledMark = true; flowEntity.Create(); service.Insert(flowEntity); } }
public void EnbaledForm(string keyValue) { FlowEntity flowEntity = GetForm(keyValue); if (flowEntity != null && !string.IsNullOrEmpty(flowEntity.Id)) { flowEntity.Modify(keyValue); flowEntity.EnabledMark = true; service.Update(flowEntity); } else { throw new Exception("获取数据异常!"); } }
public void SubmitForm(FlowEntity flowEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { if (flowEntity.FormType == (int)FormType.Custom) { flowEntity.FormUrl = string.Empty; } if (flowEntity.FormType == (int)FormType.System) { if (IsExistSystemFlow((SystemForm)flowEntity.SystemFormType, keyValue)) { throw new Exception("当前系统表单已存在流程,请确认!"); } if (flowEntity.SystemFormType != null) { flowEntity.FormUrl = EnumHelp.enumHelp.GetDefaultValue(typeof(SystemForm), (int)flowEntity.SystemFormType); flowEntity.SystemFormName = EnumHelp.enumHelp.GetDescription(typeof(SystemForm), (int)flowEntity.SystemFormType); } flowEntity.FormId = string.Empty; } flowEntity.Modify(keyValue); service.Update(flowEntity); } else { if (flowEntity.FormType == (int)FormType.Custom) { flowEntity.FormUrl = string.Empty; } if (flowEntity.FormType == (int)FormType.System) { if (IsExistSystemFlow((SystemForm)flowEntity.SystemFormType, keyValue)) { throw new Exception("当前系统表单已存在流程,请确认!"); } if (flowEntity.SystemFormType != null) { flowEntity.FormUrl = EnumHelp.enumHelp.GetDefaultValue(typeof(SystemForm), (int)flowEntity.SystemFormType); flowEntity.SystemFormName = EnumHelp.enumHelp.GetDescription(typeof(SystemForm), (int)flowEntity.SystemFormType); } flowEntity.FormId = string.Empty; } flowEntity.EnabledMark = true; flowEntity.Create(); service.Insert(flowEntity); } }