Example #1
0
        public ActionResult Edit(Menu entity)
        {
            var model = new MenuDao();
            var res   = model.Edit(entity);

            if (res)
            {
                SetAlert("Cập nhật dữ liệu thành công", "success");
                return(RedirectToAction("Index", "menu"));
            }
            else
            {
                ModelState.AddModelError("", "Thêm không thành công");
            }
            SetViewBag(entity.IDMenu);
            return(View("Edit"));
        }