예제 #1
0
        public ActionResult Default()
        {
            int unDoCount = taskApp.GetCount("0"); //未完成数
            int doCount   = taskApp.GetCount("1"); //已完成数

            ViewBag.UnDoCount = unDoCount;
            ViewBag.DoCount   = doCount;

            return(View());
        }
예제 #2
0
        public ActionResult GetTaskCount(string status)
        {
            var data = taskApp.GetCount(status);

            return(Content(data.ToJson()));
        }