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