public ActionResult Default() { int unDoCount = taskApp.GetCount("0"); //未完成数 int doCount = taskApp.GetCount("1"); //已完成数 ViewBag.UnDoCount = unDoCount; ViewBag.DoCount = doCount; return(View()); }
public ActionResult GetTaskCount(string status) { var data = taskApp.GetCount(status); return(Content(data.ToJson())); }