public override void Run()
        {
            IRunTimeCommandRigister cmdRegister    = this.Owner as IRunTimeCommandRigister;
            ProjectTaskController   mainController = cmdRegister.ControllerFinder.FindController <ProjectTaskController>(string.Empty);

            if (mainController.SelectedObject == null)
            {
                return;
            }

            cmdRegister.ClearOldCommand(this.Parameter);
            string groupName = this.Parameter;

            BaseController baseController = cmdRegister.ControllerFinder.FindController <BaseController>("BaseControllerList");
            Guid?          projectId      = baseController.GetSelectedProjectId();
            IEnumerable <LookupListItem <Guid?> > iterations = mainController.GetProjectIterationsForMenu(projectId);


            foreach (var iteration in iterations)
            {
                MoveTaskToIterationCommand action = new MoveTaskToIterationCommand();
                action.Parameter = iteration.Value.ToString();
                cmdRegister.AddRunTimeCommand(groupName, iteration.DisplayName, string.Empty, action, iteration.IsDeafult);
            }
        }
Beispiel #2
0
        public override void Run()
        {
            if (!(this.Owner is ProjectTaskController))
            {
                return;
            }
            ProjectTaskController projectTaskController = (ProjectTaskController)this.Owner;

            projectTaskController.GenerateDayReport();
        }
Beispiel #3
0
        public override void Run()
        {
            Guid?iterationId = null;

            if (!string.IsNullOrEmpty(this.Parameter))
            {
                iterationId = Guid.Parse(this.Parameter);
            }
            ProjectTaskController controller = this.Owner as ProjectTaskController;

            controller.MoveTaskToIteration(iterationId);
        }
        public override void Run()
        {
            Guid?memerId = null;

            if (!string.IsNullOrEmpty(this.Parameter))
            {
                memerId = Guid.Parse(Parameter);
            }
            ProjectTaskController controller = this.Owner as ProjectTaskController;

            controller.GiveTaskToMember(memerId);
        }
 public bool IsValid(object caller, Condition condition)
 {
     if (caller is ProjectTaskController)
     {
         ProjectTaskController controllder = caller as ProjectTaskController;
         if (controllder.SelectedObject != null)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     return(false);
 }
Beispiel #6
0
        static void Main(string[] args)
        {
            //Make a team ex

            int teamLead        = TeamMemberController.AddTeamMember("Vasiliy");
            int developer       = TeamMemberController.AddTeamMember("Anton");
            int juniorDeveloper = TeamMemberController.AddTeamMember("Alexander");
            int tester          = TeamMemberController.AddTeamMember("Katya");

            //Manage teams

            TeamMemberController.AddToTeam(teamLead, developer);
            TeamMemberController.AddToTeam(teamLead, tester);
            TeamMemberController.AddToTeam(developer, juniorDeveloper);

            var taskController = new ProjectTaskController("path", "path");
            int task1          = taskController.AddTask("Task1", "Make project wiki");
            int task2          = taskController.AddTask("Task2", "Add structure");
            int task3          = taskController.AddTask("Task3", "Make tests");

            //Print tasks state

            Console.WriteLine(taskController.GetTask(task1).State);
            Console.WriteLine(taskController.GetTask(task2).State);
            Console.WriteLine(taskController.GetTask(task3).State);

            //Assign

            taskController.EditTaskOwner(task1, juniorDeveloper);
            taskController.EditTaskOwner(task2, developer);
            taskController.EditTaskOwner(task3, tester);

            //Emitate work

            taskController.EditTaskDescription(task1, "some better description");
            taskController.EditTaskState(task2, ProjectTaskState.Active);
            taskController.EditTaskOwner(task3, teamLead);
            Console.WriteLine("Edited!");
            taskController.EditTaskDescription(task1, "even more better description");

            Thread.Sleep(5000);
            //Check our reports!
            foreach (var item in taskController.GetAllReports())
            {
                item.PrintData();
            }
        }
 public void Setup()
 {
     mediator = new Mock <IMediator>();
     mapper   = new Mock <IMapper>();
     projectTaskController = new ProjectTaskController(mediator.Object, mapper.Object);
 }