コード例 #1
0
 public ActionResult Edit(employee emp)
 {
     if (ModelState.IsValid)
     {
         employeeBL.Update(emp);
         return(RedirectToAction("Index"));
     }
     else
     {
         TempData["ErrorMessage"] = "All The Fields are Required!";
         return(RedirectToAction("Edit", new { empId = emp.ID }));
     }
 }