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"));
        }
예제 #2
0
 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));
 }
예제 #3
0
 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));
 }
예제 #4
0
 virtual public void Update_Item(t Item)
 {
     context.Entry <t>(Item).State = System.Data.Entity.EntityState.Modified;
     context.SaveChanges();
 }