public ActionResult DisplayProjectTask(int id)
        {
            var prepository = new ProjectRepository();
            var project     = prepository.Find(id);

            var trepository = new TaskNRepository();
            var tasks       = trepository.GetTasks(id);

            var viewmodel = new ProjectTaskViewModel();

            viewmodel.ProjectId        = project.ProjectId;
            viewmodel.ProjectTitle     = project.ProjectTitle;
            viewmodel.ProjectStartDate = project.ProjectStartDate;
            viewmodel.ProjectEndDate   = project.ProjectEndDate;
            viewmodel.EmployeeId       = project.EmployeeId;

            viewmodel.Tasks = tasks;

            return(View(viewmodel));
        }
Esempio n. 2
0
 public TaskService()
 {
     TaskRepo = new TaskNRepository();
 }