public async Task <ActionResult> DeleteConfirmed(int id) { DetalleDepreciacion detalledepreciacion = await db.DetalleDepreciacions.FindAsync(id); db.DetalleDepreciacions.Remove(detalledepreciacion); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "DetalleDepreciacionId")] DetalleDepreciacion detalledepreciacion) { if (ModelState.IsValid) { db.Entry(detalledepreciacion).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(detalledepreciacion)); }
public async Task <ActionResult> Create([Bind(Include = "DetalleDepreciacionId")] DetalleDepreciacion detalledepreciacion) { if (ModelState.IsValid) { db.DetalleDepreciacions.Add(detalledepreciacion); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(detalledepreciacion)); }
// GET: /DetalleDepreciacion/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DetalleDepreciacion detalledepreciacion = await db.DetalleDepreciacions.FindAsync(id); if (detalledepreciacion == null) { return(HttpNotFound()); } return(View(detalledepreciacion)); }