public ActionResult GetAllTasksForProject(int Id) { ViewBag.Project = db.Projects.Find(Id); var result = ProjectHelper.AllTasksByProject(db, Id).OrderByDescending(p => p.Priority).ToList(); return(View(result)); }
public ActionResult GetAllTasksForProject(int Id) { ViewBag.Project = db.Projects.Find(Id); var result = ProjectHelper.AllTasksByProject(Id); return(View(result)); }
public ActionResult HideCompletedTasks(int Id) { ViewBag.Project = db.Projects.Find(Id); var tasks = ProjectHelper.AllTasksByProject(db, Id).OrderByDescending(p => p.Priority).ToList(); var result = tasks.Where(t => t.IsCompleted == false).ToList(); return(View("GetAllTasksForProject", result)); }
// private ApplicationDbContext db = new ApplicationDbContext(); // GET: Task public ActionResult Index(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } // var userId = User.Identity.GetUserId(); var projectTasks = ProjectHelper.AllTasksByProject((int)id); return(View(projectTasks.ToList())); }
public async Task <ActionResult> ShowAllTasksForProject(int Id) { var userId = User.Identity.GetUserId(); var model = new IndexViewModel { HasPassword = HasPassword(), PhoneNumber = await UserManager.GetPhoneNumberAsync(userId), TwoFactor = await UserManager.GetTwoFactorEnabledAsync(userId), Logins = await UserManager.GetLoginsAsync(userId), BrowserRemembered = await AuthenticationManager.TwoFactorBrowserRememberedAsync(userId), Tasks = ProjectHelper.AllTasksByProject(db, Id).OrderByDescending(p => p.Priority).ToList() }; return(View("GetAllTasksForProject", model)); }