Esempio n. 1
0
        public ActionResult Create()
        {
            var cmd = new CreateNewProject();
            cmd.ProjectId = Guid.NewGuid();

            return View(cmd);
        }
Esempio n. 2
0
        public ActionResult Create(CreateNewProject cmd)
        {
            var service = new ScrumrCommandServiceClient();
            service.ExecuteCommand(cmd);

            return RedirectToAction("Details", new {cmd.ProjectId});
        }
Esempio n. 3
0
        public ActionResult Create(CreateNewProject createCommand)
        {
            var service = new ScrumrCommandServiceClient();
            var sprintId = Guid.NewGuid();

            service.ExecuteCommand(createCommand);
            service.ExecuteCommand(new AddNewSprintToProject(createCommand.ProjectId, sprintId, "Sprint 0", DateTime.UtcNow, DateTime.UtcNow.AddDays(7 * 4)));
            service.ExecuteCommand(new StartSprint(createCommand.ProjectId, sprintId));

            return RedirectToAction("ScrumBoard", new {createCommand.ProjectId});
        }