public ActionResult Edit([Bind(Include = "ID,Date,Amount,Note")] Expend expend)
 {
     if (ModelState.IsValid)
     {
         db.Entry(expend).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(expend));
 }
Exemple #2
0
 public ActionResult Edit(quanlichitieu model)
 {
     validateBound(model);
     if (ModelState.IsValid)
     {
         db.Entry(model).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }