public IActionResult DeleteBaiHoc(int?Id) { if (Id == null) { return(NotFound()); } else { if (HttpContext.Session.GetString("VaiTro") == "NguoiQuanTri") { ViewBag.Name = HttpContext.Session.GetString("Ten"); var baiHoc = baiHocService.GetBaiHoc(Id); return(View(baiHoc)); } return(Redirect(@"~/NguoiDung/Login")); } }
public IActionResult CreateCauHoi() { if (HttpContext.Session.GetString("VaiTro") == "NguoiQuanTri") { ViewBag.Name = HttpContext.Session.GetString("Ten"); if (SoCauHoi == 3) { var baiHoc = baiHocService.GetBaiHoc(baiHocService.GetIDBaiHoc()); return(RedirectToAction("Details", baiHoc)); } else { SoCauHoi = SoCauHoi + 1; return(View()); } } return(Redirect(@"~/NguoiDung/Login")); }