public IActionResult UpdateControlAccount(int id, string desc) { GL_CONTROL_ACCOUNTS data = _db.GL_CONTROL_ACCOUNTs.Find(id); if (data != null) { data.DESCRIPTION = desc; _db.Entry(data).State = EntityState.Modified; _db.SaveChanges(); } return(Redirect("/Home/ChartAccountsList")); }
public ActionResult Edit([Bind(Include = "ID,Name,Gender,Birthday")] Student student) { if (ModelState.IsValid) { db.Entry(student).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(student)); }
public ActionResult Edit([Bind(Include = "ID,Nota,Subject,Estado")] Note note) { if (ModelState.IsValid) { db.Entry(note).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(note)); }
virtual public void Update_Item(t Item) { context.Entry <t>(Item).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); }