Esempio n. 1
0
        public JsonResult ExportReport(string fid)
        {
            string fileName = $"{UUIDUtils.Fid}.xls";
            string filePath = Path.Combine(Environment.CurrentDirectory, FapPlatformConstants.TemporaryFolder, fileName);

            try
            {
                _surveyService.ExportSurveyStat(filePath, fid);
                return(Json(new { error_code = 0, exportStatus = 0, fn = $"{FapPlatformConstants.TemporaryFolder}/{fileName}" }));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.StackTrace);
                return(Json(new { error_code = 1, exportStatus = 0 }));
            }
        }