예제 #1
0
        public ActionResult ThemTuSach(TudachValue ts)
        {
            bool kt = new TusachController().InsertElement(ts);

            if (kt == true)
            {
                return(RedirectToAction("DanhSachTuS"));
            }
            return(View());
        }
예제 #2
0
        public ActionResult SuaTuSach(TudachValue sach)
        {
            bool kq = new TusachController().SuaTuSach(sach);

            if (kq == false)
            {
                ModelState.AddModelError("Loi", "Không thể sửa được");
                return(View());
            }

            return(RedirectToAction("DanhSachTuS"));
        }