Exemplo n.º 1
0
        public JsonResult ChangeStatus(long id)
        {
            var result = new ChuongTrinhDaoTaoDAO().ChangeStatus(id);

            return(Json(new
            {
                status = result
            }));
        }
Exemplo n.º 2
0
        public ActionResult IndexSpecial(string searchString, int page = 1, int pageSize = 10)
        {
            var dao   = new ChuongTrinhDaoTaoDAO();
            var model = dao.ListAllPagingSpecial(searchString, page, pageSize);

            ViewBag.SearchString = searchString;

            return(View(model));
        }
Exemplo n.º 3
0
        public ActionResult Create(Course ne)
        {
            if (ModelState.IsValid)
            {
                var dao = new ChuongTrinhDaoTaoDAO();

                long id = dao.Insert(ne);
                if (id > 0)
                {
                    ModelState.AddModelError("Thêm thành công", "success");
                    return(RedirectToAction("Index", "ChuongTrinhDaoTao"));
                }
                else
                {
                    ModelState.AddModelError("", "Thêm không thành công");
                }
            }
            SetViewBag();
            return(View());
        }
Exemplo n.º 4
0
        public ActionResult EditSpecial(Special_TypeCourse ne)
        {
            if (ModelState.IsValid)
            {
                var dao = new ChuongTrinhDaoTaoDAO();

                var result = dao.UpdateSpeciall(ne);
                if (result)
                {
                    ModelState.AddModelError("Cập nhật thành công", "success");
                    return(RedirectToAction("IndexSpecial", "ChuongTrinhDaoTao"));
                }
                else
                {
                    ModelState.AddModelError("", "Cập nhật không thành công");
                }
            }
            SetViewBagSpecial(ne.TypeCourseID);
            return(View());
        }