public ActionResult Create(ProjectCategory projectcategory) { if (ModelState.IsValid) { db.ProjectCategories.Add(projectcategory); db.SaveChanges(); return RedirectToAction("Index"); } return View(projectcategory); }
public ModelRepository() { Project = new Project(); ProjectsList = new List<Project>(); ProjectCategory = new ProjectCategory(); ProjectCategoryList = new List<ProjectCategory>(); Personel = new Personel(); PersonelList = new List<Personel>(); Position = new Position(); PositionList = new List<Position>(); Task = new Task(); TaskList = new List<Task>(); WorkDay = new WorkDay(); WorkDayList = new List<WorkDay>(); }
public ActionResult Edit(ProjectCategory projectcategory) { if (ModelState.IsValid) { db.Entry(projectcategory).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(projectcategory); }