コード例 #1
0
        public ActionResult Create(Project project)
        {
            if (ModelState.IsValid)
            {
                CreateProjectRequest request = new CreateProjectRequest();
                request.Project = project;

                CreateProjectResponse response = _projectService.CreateProject(request);
                if (response.Success)
                {
                    return RedirectToAction("Index");
                }
            }

            return View(project);
        }
コード例 #2
0
 public ActionResult Create()
 {
     Project project = new Project();
     return View(project);
 }
コード例 #3
0
 private IEnumerable<Person> GetPersonsToAssign(Project project)
 {            
     IList<Person> persons = new List<Person>();
     IEnumerable<Person> allPerson = _personRepository.FindAll();
     foreach (Person p in allPerson)
     {
         if(!project.AssignedPersons.ToDictionary(x => x.Id).ContainsKey(p.Id))
         {
             persons.Add(p);
         }
     }
     return persons;
 }