public ActionResult Edit(Slide slide) { //SetViewBag(); var dao = new SlideDAO(); var UserSession = (UserSession)Session[CommondConstant.USER_SESSION]; slide.ModifiedBy = UserSession.Username; slide.ModifiedDate = DateTime.Now; if (dao.UpdateSlide(slide)) { SetAlert("Edit the slide sucessfull!", "success"); return(RedirectToAction("Index", "Slide")); } else { ModelState.AddModelError("", "An error when edit slide!"); } return(View()); }