private void Submit(DynamicForm.Core.DFDictionary entity, ref string message)
        {
            var user = Util.GetCurrentUser();
            var page = ((this.Parent as ucForm).Page as DFIndexWF);

            // 如果是提交按钮,业务 ucForm1 保存成功的话,就可以进行提交
            if (base.GetSubmitButton(entity) == "btnSubmit" && page.UcForm1.DA.ExecuteResult == DFPub.EXECUTE_SUCCESS)
            {
                var InstanceStepExecutorId = entity["InstanceStepExecutorId"];
                if (!string.IsNullOrWhiteSpace(InstanceStepExecutorId))
                {
                    new StateEngineHelper().AutoFlow(InstanceStepExecutorId, "提交".GetRes(), user.UserId, user.UserName);
                    base.WriteScript(string.Format("alert('提交成功,本窗口将自动关闭!');window.top.close();"), ref message);
                }
            }
        }
Beispiel #2
0
 public override int Insert(DynamicForm.Core.FormM form, DynamicForm.Core.DFDictionary entity, ref string message)
 {
     try
     {
         var currentUser = Util.GetCurrentUser().UserName;
         var list        = base.GetGridClientData <VM_WF_M_MODEL>(entity, "grid1");
         if (list == null || list.Count == 0)
         {
             throw new WFException("没有得到客户端 grid 的数据,请检查 gridid 是否正确?");
         }
         foreach (var item in list.Where(a => a.selected))
         {
             WFDA.Instance.Copy(item.ModelId, currentUser);
         }
         return(DFPub.EXECUTE_SUCCESS);
     }
     catch (Exception ex)
     {
         message = ex.Message;
         return(DFPub.EXECUTE_ERROR);
     }
 }
 public override int Insert(DynamicForm.Core.FormM form, DynamicForm.Core.DFDictionary entity, ref string message)
 {
     Submit(entity, ref message);
     return(base.Insert(form, entity, ref message));
 }