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