Пример #1
0
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to kick-start your ASP.NET MVC application.";

            //throw new Exception("test");
            int loginID = int.Parse(User.Identity.Name.Split('|')[0]);

            ViewData["accoutid"]   = loginID;
            ViewData["accoutname"] = User.Identity.Name.Split('|')[1];
            ViewData["DateTime"]   = DateTime.Now.Year;
            ViewData["Version"]    = AppConfig.Version;

            //未读邮件数量
            BLL.Email.Email email = new BLL.Email.Email();
            ViewData["Email"] = email.GetEmailCount(loginID, 1);

            //待办工作数量
            Flow flow = new Flow();

            ViewData["Approve"] = flow.ApproveListCount(loginID);

            //待办工作数量
            ViewData["Notify"] = flow.NotifyListCount(loginID);

            //密码规则
            ViewData["CodeRule"] = CodeRule;

            //首页刷新时间间隔
            ViewData["RefreshInterval"] = RefreshInterval;

            return(View());
        }
Пример #2
0
        public ActionResult refreshApprove()
        {
            int loginID = int.Parse(User.Identity.Name.Split('|')[0]);

            //待办工作数量
            Flow flow    = new Flow();
            int  a_count = flow.ApproveListCount(loginID);

            return(Json(new { Message = a_count }, "text/html", JsonRequestBehavior.AllowGet));
        }