public ActionResult DeleteConfirmed(int id) { OutsourceVehicleGroupCompany outsourceVehicleGroupCompany = db.OutsourceVehicleGroupCompanies.Find(id); db.OutsourceVehicleGroupCompanies.Remove(outsourceVehicleGroupCompany); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "OutsourceVehicleGroupCompaniesID,OutsourceVehicleGroupCompaniesDescription")] OutsourceVehicleGroupCompany outsourceVehicleGroupCompany) { if (ModelState.IsValid) { db.Entry(outsourceVehicleGroupCompany).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(outsourceVehicleGroupCompany)); }
public ActionResult Create([Bind(Include = "OutsourceVehicleGroupCompaniesID,OutsourceVehicleGroupCompaniesDescription")] OutsourceVehicleGroupCompany outsourceVehicleGroupCompany) { if (ModelState.IsValid) { db.OutsourceVehicleGroupCompanies.Add(outsourceVehicleGroupCompany); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(outsourceVehicleGroupCompany)); }
// GET: OutsourceVehicleGroupCompany/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OutsourceVehicleGroupCompany outsourceVehicleGroupCompany = db.OutsourceVehicleGroupCompanies.Find(id); if (outsourceVehicleGroupCompany == null) { return(HttpNotFound()); } return(View(outsourceVehicleGroupCompany)); }