private FoWoSoft.Data.Model.WorkFlowCustomEventParams firstevent(EnumType.ExecuteType executeType, FoWoSoft.Data.Model.WorkFlowCustomEventParams eventParams, IEnumerable <FoWoSoft.Data.Model.WorkFlowInstalledSub.Step> steps) { foreach (var step in steps) { //步骤提交前事件 if (!step.Event.SubmitBefore.IsNullOrEmpty() && (executeType == (EnumType.ExecuteType.Submit | EnumType.ExecuteType.Completed))) { object obj = btask.ExecuteFlowCustomEvent(step.Event.SubmitBefore.Trim(), eventParams); Response.Write(string.Format("执行步骤提交前事件:({0}) 返回值:{1}<br/>", step.Event.SubmitBefore.Trim(), obj.ToString())); } //步骤退回前事件 if (!step.Event.BackBefore.IsNullOrEmpty() && executeType == EnumType.ExecuteType.Back) { object obj = btask.ExecuteFlowCustomEvent(step.Event.BackBefore.Trim(), eventParams); Response.Write(string.Format("执行步骤退回前事件:({0}) 返回值:{1}<br/>", step.Event.BackBefore.Trim(), obj.ToString())); } } return(eventParams); }
private Dictionary <Guid, List <FoWoSoft.Data.Model.Users> > GetExecuteSetps(LitJson.JsonData stepsjson, EnumType.ExecuteType executeType) { Dictionary <Guid, List <FoWoSoft.Data.Model.Users> > steps = new Dictionary <Guid, List <FoWoSoft.Data.Model.Users> >(); if (stepsjson.IsArray) { foreach (LitJson.JsonData step in stepsjson) { string id = step["id"].ToString(); string member = step["member"].ToString(); Guid gid; if (id.IsGuid(out gid)) { switch (executeType) { case EnumType.ExecuteType.Submit: steps.Add(gid, borganize.GetAllUsers(member)); break; case EnumType.ExecuteType.Back: steps.Add(gid, new List <FoWoSoft.Data.Model.Users>()); break; case EnumType.ExecuteType.Save: break; case EnumType.ExecuteType.Completed: break; case EnumType.ExecuteType.Redirect: break; } } if (executeType == EnumType.ExecuteType.Redirect) { steps.Add(Guid.Empty, borganize.GetAllUsers(member)); } } } return(steps); }