public ActionResult UpdEmployee(UpdEmployeeViewModel param) { //表單驗證 if (ModelState.IsValid) { var Data = HomeDomain.UpdEmployee(param); if (String.IsNullOrWhiteSpace(Data)) { return(RedirectToAction("Index", "Home")); } else { TempData["message"] = Data; return(View(param)); } } return(View(param)); }
public ActionResult UpdEmployee(int Id) { var viewData = HomeDomain.GetUpdEmployee(Id); return(View(viewData)); }
// GET: Home public ActionResult Index() { var viewData = HomeDomain.GetHomeIndex(); return(View(viewData)); }