public ActionResult DeleteConfirmed(int id) { IntervaloPrecio intervaloPrecio = db.IntervaloPrecios.Find(id); db.IntervaloPrecios.Remove(intervaloPrecio); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,CodIntervalo,DesIntervalo,Activo")] IntervaloPrecio intervaloPrecio) { if (ModelState.IsValid) { db.Entry(intervaloPrecio).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(intervaloPrecio)); }
public ActionResult Create([Bind(Include = "Id,CodIntervalo,DesIntervalo,Activo")] IntervaloPrecio intervaloPrecio) { if (ModelState.IsValid) { db.IntervaloPrecios.Add(intervaloPrecio); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(intervaloPrecio)); }
// GET: IntervaloPrecio/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } IntervaloPrecio intervaloPrecio = db.IntervaloPrecios.Find(id); if (intervaloPrecio == null) { return(HttpNotFound()); } return(View(intervaloPrecio)); }