public IActionResult Overdue()
        {
            if (int.TryParse(_userManager.GetUserId(User), out int UserID))
            {
                List <Task> allTasksForUser = tasksDAL.GetAllTasksByUserID(UserID).ToList();

                ViewData["allTasks"] = allTasksForUser.FindAll(t => t.DueDate <= DateTime.Now);
            }
            else
            {
                return(RedirectToAction("Login", "Account"));
            }


            return(View("Index"));
        }
예제 #2
0
        public IActionResult Index()
        {
            if (int.TryParse(_userManager.GetUserId(User), out int UserID))
            {
                ViewData["allTasks"] = tasksDAL.GetAllTasksByUserID(UserID);
            }
            else
            {
                return(RedirectToAction("Login", "Account"));
            }


            return(View());
        }