From 7878d8ae9ecc8945969a700a3b9da9439b83563e Mon Sep 17 00:00:00 2001 From: kamonwan taengsuk Date: Fri, 17 Mar 2023 19:07:48 +0700 Subject: [PATCH] update --- ...ntGeneticConservationProject.Controller.cs | 6 ++ .../project_principle_rationale.Controller.cs | 6 ++ .../project_request_thailand.Controller.cs | 8 +-- Models/budget/conservation_project.cs | 8 ++- Models/budget/project_request_thai.cs | 8 ++- .../plant_genetic_conservation_project.frx | 64 +++++++++++-------- wwwroot/reports/project_request_thailands.frx | 58 +++++++++-------- 7 files changed, 97 insertions(+), 61 deletions(-) diff --git a/Controllers/PlantGeneticConservationProject.Controller.cs b/Controllers/PlantGeneticConservationProject.Controller.cs index 7f6776a..03f27a3 100644 --- a/Controllers/PlantGeneticConservationProject.Controller.cs +++ b/Controllers/PlantGeneticConservationProject.Controller.cs @@ -84,6 +84,12 @@ namespace rmutr_report.Controllers stream.Seek(0, SeekOrigin.Begin); return File(stream, "text/csv"); break; + case "doc": case "docx": + Word2007Export word = new Word2007Export(); + report.Export(word, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "appllication/vnd.ms-word"); + break; } return Ok(); diff --git a/Controllers/project_principle_rationale.Controller.cs b/Controllers/project_principle_rationale.Controller.cs index 27ab1c8..e5288b4 100644 --- a/Controllers/project_principle_rationale.Controller.cs +++ b/Controllers/project_principle_rationale.Controller.cs @@ -180,6 +180,12 @@ namespace rmutr_report.Controllers stream.Seek(0, SeekOrigin.Begin); return File(stream, "text/csv"); break; + case "doc": case "docx": + Word2007Export word = new Word2007Export(); + report.Export(word, stream); + stream.Seek(0, SeekOrigin.Begin); + return File(stream, "appllication/vnd.ms-word"); + break; } return Ok(); diff --git a/Controllers/project_request_thailand.Controller.cs b/Controllers/project_request_thailand.Controller.cs index eae0335..0274c8b 100644 --- a/Controllers/project_request_thailand.Controller.cs +++ b/Controllers/project_request_thailand.Controller.cs @@ -77,11 +77,11 @@ namespace rmutr_report.Controllers stream.Seek(0, SeekOrigin.Begin); return File(stream, "multipart/related"); break; - case "csv": - CSVExport csv = new CSVExport(); - report.Export(csv, stream); + case "doc": case "docx": + Word2007Export word = new Word2007Export(); + report.Export(word, stream); stream.Seek(0, SeekOrigin.Begin); - return File(stream, "text/csv"); + return File(stream, "appllication/vnd.ms-word"); break; } diff --git a/Models/budget/conservation_project.cs b/Models/budget/conservation_project.cs index a186305..a313930 100644 --- a/Models/budget/conservation_project.cs +++ b/Models/budget/conservation_project.cs @@ -343,8 +343,12 @@ namespace rmutr_report.Models public string clause3 { get; set; } public string percentage1 { get; set; } public string percentage2 { get; set; } - public string target { get; set; } - public string results { get; set; } + public string target1 { get; set; } + public string target2 { get; set; } + public string target3 { get; set; } + public string results1 { get; set; } + public string results2 { get; set; } + public string results3 { get; set; } public string clause4 { get; set; } public decimal? expenses { get; set; } } diff --git a/Models/budget/project_request_thai.cs b/Models/budget/project_request_thai.cs index 097125c..c2ab759 100644 --- a/Models/budget/project_request_thai.cs +++ b/Models/budget/project_request_thai.cs @@ -94,8 +94,12 @@ namespace rmutr_report.Models public string clause3 { get; set; } public string percentage1 { get; set; } public string percentage2 { get; set; } - public string target { get; set; } - public string results { get; set; } + public string target1 { get; set; } + public string target2 { get; set; } + public string target3 { get; set; } + public string results1 { get; set; } + public string results2 { get; set; } + public string results3 { get; set; } public string clause4 { get; set; } public decimal? expenses { get; set; } } diff --git a/wwwroot/reports/plant_genetic_conservation_project.frx b/wwwroot/reports/plant_genetic_conservation_project.frx index f595ac9..9ed3f65 100644 --- a/wwwroot/reports/plant_genetic_conservation_project.frx +++ b/wwwroot/reports/plant_genetic_conservation_project.frx @@ -1,5 +1,5 @@  - + @@ -233,8 +233,12 @@ - - + + + + + + @@ -300,44 +304,44 @@ - + - + - + - + - + - + - + @@ -898,32 +902,36 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + - + diff --git a/wwwroot/reports/project_request_thailands.frx b/wwwroot/reports/project_request_thailands.frx index a89370c..1f5ace6 100644 --- a/wwwroot/reports/project_request_thailands.frx +++ b/wwwroot/reports/project_request_thailands.frx @@ -1,5 +1,5 @@  - + @@ -226,8 +226,12 @@ - - + + + + + + @@ -292,44 +296,44 @@ - + - + - + - + - + - + - + @@ -877,27 +881,31 @@ - + - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + +