public ActionResult DsKhoaHocKiThuat()
        {
            var manager = (Account)Session[Constant.MANAGER_SESSION];

            if (manager == null)
            {
                return(RedirectToRoute("quanlylogin"));
            }

            var managerPersmission = (List <UserPermission>)Session[Constant.MANAGER_PERMISSION_SESSION];

            //var permission = 9;
            if (managerPersmission.Where(s => s.PermissionId == 9).FirstOrDefault() == null)
            {
                return(RedirectToRoute("quanlylogin"));
            }
            using (var kHKTKhoaHocKiThuatRepository = new KHKTKhoaHocKiThuatService())
            {
                using (var kHHTLinhVucRepository = new KHHTLinhVucService())
                {
                    List <KHKTLinhVucThamGia>      linhVucThamGias          = kHHTLinhVucRepository.GetKHKTLinhVucThamGias();
                    List <KhoaHocKiThuatDetailDTO> khoaHocKiThuatDetailDTOs = kHKTKhoaHocKiThuatRepository.GetKhoaHocKiThuats();
                    ViewBag.KHKT     = khoaHocKiThuatDetailDTOs;
                    ViewBag.LinhVucs = linhVucThamGias;
                    return(View());
                }
            }
        }
        public async Task <ActionResult> TaoDsKhoaHocKithuat()
        {
            Account account = (Account)Session[Utils.Constant.MANAGER_SESSION];

            if (account == null)
            {
                return(RedirectToRoute("login"));
            }
            using (var kHKTKhoaHocKiThuatRepository = new KHKTKhoaHocKiThuatService())
            {
                List <KhoaHocKiThuatDetailDTO> khoaHocKiThuatDetailDTOs = kHKTKhoaHocKiThuatRepository.GetKhoaHocKiThuats();
                ViewBag.KHKT = khoaHocKiThuatDetailDTOs;
                string fileName = string.Concat("ds-khoahockythuat.xlsx");
                string filePath = System.Web.HttpContext.Current.Server.MapPath("~/Utils/Files/" + fileName);
                await Utils.ExportExcel.GenerateXLSKhoaHocKiThuat(khoaHocKiThuatDetailDTOs, filePath);

                return(File(filePath, "application/vnd.ms-excel", fileName));
            }
        }