public ActionResult DeleteConfirmed(Guid id) { VehicleEquipmentDamageType vehicleEquipmentDamageType = db.VehicleEquipmentDamageTypes.Find(id); db.VehicleEquipmentDamageTypes.Remove(vehicleEquipmentDamageType); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Description,IsMajor")] VehicleEquipmentDamageType vehicleEquipmentDamageType) { if (ModelState.IsValid) { db.Entry(vehicleEquipmentDamageType).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vehicleEquipmentDamageType)); }
public ActionResult Create([Bind(Include = "Id,Description,IsMajor")] VehicleEquipmentDamageType vehicleEquipmentDamageType) { if (ModelState.IsValid) { vehicleEquipmentDamageType.Id = Guid.NewGuid(); db.VehicleEquipmentDamageTypes.Add(vehicleEquipmentDamageType); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vehicleEquipmentDamageType)); }
// GET: VehicleEquipmentDamageTypes/Delete/5 public ActionResult Delete(Guid?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VehicleEquipmentDamageType vehicleEquipmentDamageType = db.VehicleEquipmentDamageTypes.Find(id); if (vehicleEquipmentDamageType == null) { return(HttpNotFound()); } return(View(vehicleEquipmentDamageType)); }