Esempio n. 1
0
        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));
            }
        }