コード例 #1
0
 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);
     }
 }
コード例 #2
0
ファイル: FlowApp.cs プロジェクト: gongthub/Storm
 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);
     }
 }