public ActionResult FileApply(string id) { if (string.IsNullOrEmpty(id)) { GenerateSecretViewData(string.Empty); GenerateWFViewData(string.Empty); return(View()); } else { FileApply mdl = fileApplyService.Get(long.Parse(id)); GenerateSecretViewData(mdl.SECRETGRADE); GenerateWFViewData(mdl.STRUCTUREID); if (mdl.STATUS == 1) { var executeNode = bwfs.GetCurrentPrevNode(mdl.INSTANCEID); var current = bwfs.GetCurrent(mdl.INSTANCEID); ViewBag.ButtonName = current.Name; ViewBag.PreviousButtonName = executeNode == null ? String.Empty : executeNode.Name; ViewBag.UndoCheck = CommonMethods.CheckUndoButton(mdl.INSTANCEID); ViewBag.UndoAuth = executeNode == null ? true : CommonMethods.CheckUndoAuth(mdl.INSTANCEID, UserInfo); ViewBag.JumpAuth = current.Name == "开始" ? true : CommonMethods.CheckAuth(current.NID, mdl.INSTANCEID, UserInfo); ViewBag.UserList = new UserService().GetPendingUserList(current.NID, mdl.INSTANCEID); } return(View(mdl)); } }
public JsonResult GetCurrent(string instanceID) { var executeNode = bwfs.GetCurrentPrevNode(instanceID); var current = bwfs.GetCurrent(instanceID); return(Json(new { NID = current.NID, Name = current.Name, Category = current.NodeType.ToString(), HasAuth = (current.Name == "开始" ? true : CommonMethods.CheckAuth(current.NID, instanceID, UserInfo)) })); }
public JsonResult GetCurrent(string instanceID) { WorkflowInstance instance = WorkflowInstance.GetInstance(instanceID); var current = instance.Current; return(Json(new { current.NID, current.Name, Category = current.NodeType.ToString(), HasAuth = (current.Name == "开始" && instance.State == WorkflowInstanceState.Running) ? true : instance.State == WorkflowInstanceState.Running && CommonMethods.CheckAuth(current.NID, instanceID, UserInfo) })); }
/// <summary> /// 审核框架 /// </summary> /// <param name="url">请求url</param> /// <param name="instanceID">实例</param> /// <returns></returns> public ActionResult AuditFrame(string url, string instanceID) { ViewBag.renderUrl = (!String.IsNullOrEmpty(instanceID))? string.Format("{0}/{1}", url, instanceID) :url; ViewBag.url = url; ViewBag.instanceID = instanceID; if (!String.IsNullOrEmpty(instanceID)) { var executeNode = bwfs.GetCurrentPrevNode(instanceID); var current = bwfs.GetCurrent(instanceID); ViewBag.ButtonName = current.Name; ViewBag.JumpAuth = current.Name == "开始" ? true : CommonMethods.CheckAuth(current.NID, instanceID, UserInfo); } else { ViewBag.JumpAuth = true; ViewBag.ButtonName = "开始"; } return(View()); }