public void updateWorkRoute(WorkRoute workRoute) { var workRouteInDb = _db.WorkRoutes.Single(m => m.Id == workRoute.Id); workRouteInDb.Name = workRoute.Name; Save(); }
public ActionResult Create(WorkRoute workRoute) { _db.AddWorkRoute(workRoute); return(RedirectToAction("Index", "WorkRoute")); }
public ActionResult Edit(WorkRoute workRoute) { if (ModelState.IsValid) { _db.UpdateWorkRoute(workRoute); } return(RedirectToAction("Index", "WorkRoute")); }
public ActionResult Delete(WorkRoute workRoute) { _db.RemoveWorkRoute(workRoute.Id); return(RedirectToAction("Index", "WorkRoute")); }
public void UpdateWorkRoute(WorkRoute workRoute) { _db.updateWorkRoute(workRoute); }
public void AddWorkRoute(WorkRoute workRoute) { _db.AddWorkRoute(workRoute); }
public void AddWorkRoute(WorkRoute workRoute) { _db.WorkRoutes.Add(workRoute); Save(); }