public IActionResult ImportFilterSetting() { try { // 調用 CSVService 提供的函數來匯入設定檔 CSVService.ImportFilterSetting(_context); return(RedirectToRoute(new { controller = "Setting", action = "Index" })); } catch (Exception ex) { _logger.LogError(ex.ToString()); ViewBag.Error = "匯入設定時發生錯誤,請查看LOG!"; return(View("~/Views/Shared/ErrorPage.cshtml")); } }