// // GET: /AssignTask/ public ActionResult Index(int id) { var task = TaskBO.GetById(id); if (task == null) { return(RedirectToAction("NotFound", "Home")); } var assignTasks = TaskBO.AssignTaskGetByTaskId(id); if (assignTasks != null && assignTasks.Count > 0) { for (int i = 0; i < assignTasks.Count; i++) { assignTasks[i].User = UserBO.GetById(assignTasks[i].UserId); } } ViewBag.Task = task; return(View(assignTasks)); }