示例#1
0
        public ActionResult Edit(Project project)
        {
            Repository.Update(project);

            return RedirectToAction("Index");
        }
示例#2
0
        public ActionResult Delete(Project project)
        {
            Repository.Delete(project);

            return RedirectToAction("Index");
        }
示例#3
0
        public ActionResult Create(Project project)
        {
            Repository.Add(project);

            return RedirectToAction("Index");
        }
示例#4
0
 public void Delete(Project project)
 {
     _projects.Remove(GetProject(project.Id));
 }
示例#5
0
 public void Add(Project project)
 {
     _projects.Add(project);
 }
示例#6
0
 public void Update(Project project)
 {
     var projectToSave = GetProject(project.Id);
     projectToSave.Number = project.Number;
     projectToSave.Name = project.Name;
 }