public JsonResult ChangeStatus(long id) { var result = new ChuongTrinhDaoTaoDAO().ChangeStatus(id); return(Json(new { status = result })); }
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)); }
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()); }
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()); }