public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here aspnet_TiposDeVehiculo deleted = db.aspnet_TiposDeVehiculo.SingleOrDefault(tc => tc.ID == id); db.DeleteObject(deleted); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here aspnet_Aseguradoras deleted = db.aspnet_Aseguradoras.SingleOrDefault(a => a.ID == id); db.DeleteObject(deleted); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(string QSid, FormCollection collection) { try { // TODO: Add delete logic here aspnet_Empresas deleted = db.aspnet_Empresas.SingleOrDefault(e => e.QSID == QSid); db.DeleteObject(deleted); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here var itemRemove = db.aspnet_Origenes.SingleOrDefault(o => o.OrigenID == id); db.DeleteObject(itemRemove); db.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, FormCollection collection) { try { // TODO: Add delete logic here aspnet_MaterialesEmpresa deleted = db.aspnet_MaterialesEmpresa.SingleOrDefault(e => e.ID == id); string strQSIDEmpresa = deleted.QSIDEmpresa; db.DeleteObject(deleted); db.SaveChanges(); return(RedirectToAction("Index", new { idEmpresa = strQSIDEmpresa })); } catch { return(View()); } }