Ejemplo n.º 1
0
        private void AddNewTask()
        {
            TaskViewModel task = new TaskViewModel();

            //Add Task1//
            task.TaskName  = "Task1";
            task.EndDate   = "05-05-2018";
            task.StartDate = "01-01-2018";
            task.Priority  = 10;
            taskController.Post(task);

            //Add project//
            ProjectController projectsController = new ProjectController(new ProjectDAO());
            ProjectViewModel  p = new ProjectViewModel(1, "P1", "02-02-2018", "03-03-2018", 10, "");

            projectsController.Post(p);

            //Add Task2//
            TaskViewModel task1 = new TaskViewModel();

            task1.TaskName       = "Task2";
            task1.ParentTaskName = "Task1";
            task1.ProjectName    = "P1";
            task1.EndDate        = "05-05-2018";
            task1.StartDate      = "01-01-2018";
            task1.Priority       = 10;
            taskController.Post(task1);
        }
Ejemplo n.º 2
0
        private void AddNewUser()
        {
            PrTaskController taskController = new PrTaskController(new TaskDAO());
            TaskViewModel    task           = new TaskViewModel();

            //Add Task1//
            task.TaskName  = "Task1";
            task.EndDate   = "05-05-2018";
            task.StartDate = "01-01-2018";
            task.Priority  = 10;
            taskController.Post(task);

            //Add project//
            ProjectController projectsController = new ProjectController(new ProjectDAO());
            ProjectViewModel  p = new ProjectViewModel(1, "Project1", "02-02-2018", "03-03-2018", 10, "");

            projectsController.Post(p);

            //Add User//
            UserViewModel usr = new UserViewModel();

            usr.EmployeeID  = 1;
            usr.FirstName   = "User1";
            usr.LastName    = "zzz";
            usr.ProjectName = "Project1";
            usr.TaskName    = "Task1";
            userController.Post(usr);
        }