Ejemplo n.º 1
0
        public ActionResult Edit(Lesson lesson)
        {
            if (ModelState.IsValid)
            {
                var dao = new LessonDao();

                var result = dao.Update1(lesson);
                if (result)
                {
                    SetAlert("Cập nhật thành công", "success");
                    return(RedirectToAction("Index", "Lesson"));
                }
                else
                {
                    ModelState.AddModelError("", "Cập nhật không thành công");
                }
            }
            SetViewBags();
            //SetViewBag();
            SetViewBag1();
            return(View("Index"));
        }