public ActionResult DangKiKHKT(KhoaHocKithuatDTO khoaHocKithuatDTO) { var school = (T_DM_Truong)Session[Constant.SCHOOL_SESSION]; if (school == null) { return(RedirectToRoute("login")); } khoaHocKithuatDTO.SchoolId = school.SchoolID; using (var kHKTKhoaHocKiThuatRepository = new KHKTKhoaHocKiThuatService()) { KhoaHocKiThuat khoaHocKiThuat = kHKTKhoaHocKiThuatRepository.CreateKhoaHocKiThuat(khoaHocKithuatDTO); if (khoaHocKiThuat == null) { return(Json(new ReturnFormat(400, "failed", null), JsonRequestBehavior.AllowGet)); } return(Json(new ReturnFormat(200, "success", khoaHocKiThuat.Id), JsonRequestBehavior.AllowGet)); } }