public ActionResult DeleteConfirmed(int id) { horas horas = db.horas.Find(id); db.horas.Remove(horas); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "idhora,dia,hora,fecha,idestado")] horas horas) { if (ModelState.IsValid) { db.Entry(horas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idestado = new SelectList(db.estado, "idestado", "estado1", horas.idestado); return(View(horas)); }
public ActionResult Create([Bind(Include = "idhora,dia,hora,fecha,idestado")] horas horas) { if (ModelState.IsValid) { db.horas.Add(horas); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.idestado = new SelectList(db.estado, "idestado", "estado1", horas.idestado); return(View(horas)); }
// GET: horas/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } horas horas = db.horas.Find(id); if (horas == null) { return(HttpNotFound()); } return(View(horas)); }
// GET: horas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } horas horas = db.horas.Find(id); if (horas == null) { return(HttpNotFound()); } ViewBag.idestado = new SelectList(db.estado, "idestado", "estado1", horas.idestado); return(View(horas)); }