public ActionResult DeleteConfirmed(int id) { ramos ramos = db.ramos.Find(id); db.ramos.Remove(ramos); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ram_idn,ram_codigo_umas,ram_nombre")] ramos ramos) { if (ModelState.IsValid) { db.Entry(ramos).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ramos)); }
public ActionResult Create([Bind(Include = "ram_idn,ram_codigo_umas,ram_nombre")] ramos ramos) { if (ModelState.IsValid) { db.ramos.Add(ramos); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(ramos)); }
public void InsertRamos(ramos ramos) { if ((ramos.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(ramos, EntityState.Added); } else { this.ObjectContext.ramos.AddObject(ramos); } }
public void DeleteRamos(ramos ramos) { if ((ramos.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(ramos, EntityState.Deleted); } else { this.ObjectContext.ramos.Attach(ramos); this.ObjectContext.ramos.DeleteObject(ramos); } }
// GET: ramos/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ramos ramos = db.ramos.Find(id); if (ramos == null) { return(HttpNotFound()); } return(View(ramos)); }
public void UpdateRamos(ramos currentramos) { this.ObjectContext.ramos.AttachAsModified(currentramos, this.ChangeSet.GetOriginal(currentramos)); }