Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Did,DName,HOD,Gender")] Department department)
 {
     if (ModelState.IsValid)
     {
         db.Entry(department).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(department));
 }
Ejemplo n.º 2
0
 public ActionResult Edit(Employee employee)
 {
     db.Entry(employee).State = EntityState.Modified;
     db.SaveChanges();
     return(Json(employee, JsonRequestBehavior.AllowGet));
 }