public ActionResult FlowStep(int id)
        {
            var  inst       = FlowInstanceManager.GetDbRecord(id);
            var  flow       = WorkflowManager.GetDbRecord(inst.WorkflowID);
            var  node       = FlowNodeManager.GetDbRecord(inst.CurrentNodeID);
            bool allowed    = FlowNodeManager.IsUserAllowed(inst.CurrentNodeID, WebSecurity.CurrentUserName);
            bool completed  = inst.Completed;
            int  formInstID = FormManager.GetFormInstanceOfFlowInstance(id);
            var  layoutID   = LayoutManager.GetLayoutOfFlowNode(inst.CurrentNodeID);

            ViewBag.inst       = inst;
            ViewBag.flow       = flow;
            ViewBag.node       = node;
            ViewBag.allowed    = allowed;
            ViewBag.completed  = completed;
            ViewBag.formInstID = formInstID;
            ViewBag.hasLayout  = layoutID != null;
            return(View());
        }
        public ActionResult FlowStepJump(int id)
        {
            var  inst    = FlowInstanceManager.GetDbRecord(id);
            bool allowed = FlowNodeManager.IsUserAllowed(inst.CurrentNodeID, WebSecurity.CurrentUserName);

            if (!allowed)
            {
                return(RedirectToAction("TodoList", "Workflow"));
            }
            //if (inst.WorkflowID == Guid.Parse(UPlanWeb.Models.UPlanDb.WorkflowID_Project))
            //{
            //    return RedirectToAction("StepJump", "ProjectFlow", new { id = id });
            //}
            //else if (inst.WorkflowID == Guid.Parse(UPlanWeb.Models.UPlanDb.WorkflowID_UnitMutate))
            //{
            //    return RedirectToAction("Page", "UnitMutateFlow", new { id = id });
            //}
            return(RedirectToAction("StepJump", string.Format("Flow{0}", inst.WorkflowID.ToString().Replace("-", "_")), new { id = id }));
            //return RedirectToAction("FlowStep", new { id = id });
        }