bug fixed
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
kamonwan taengsuk
2023-11-15 17:43:05 +07:00
parent 70f29a15e3
commit fcbea4a3f2
10 changed files with 375 additions and 376 deletions

View File

@@ -28,22 +28,22 @@ namespace rmutr_report.Controllers
{
if (project != null)
{
var total = project.activity.Count;
if (project.activity != null)
{
foreach (var v in project.activity)
{
if (v.activity != null)
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
}
else
{
project.together_with = null;
}
}
}
// var total = project.activity.Count;
// if (project.activity != null)
// {
// foreach (var v in project.activity)
// {
// if (v.activity != null)
// {
// //var total = project.activity.Select(r => r.count).Sum(t => t.Value);
// project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
// }
// else
// {
// project.together_with = null;
// }
// }
// }
if (project.eighth != null)
{

View File

@@ -29,22 +29,22 @@ namespace rmutr_report.Controllers
{
if (project != null)
{
var total = project.activity.Count;
if (project.activity != null)
{
foreach (var v in project.activity)
{
if (v.activity != null)
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
}
else
{
project.together_with = null;
}
}
}
// var total = project.activity.Count;
// if (project.activity != null)
// {
// foreach (var v in project.activity)
// {
// if (v.activity != null)
// {
// //var total = project.activity.Select(r => r.count).Sum(t => t.Value);
// project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
// }
// else
// {
// project.together_with = null;
// }
// }
// }
if (project.eighth != null)
{

View File

@@ -47,22 +47,22 @@ namespace rmutr_report.Controllers
// }
if (project != null)
{
var total = project.activity.Count;
if (project.activity != null)
{
foreach (var v in project.activity)
{
if (v.activity != null)
{
//var total = project.activity.Select(r => r.count).Sum(t => t.Value);
project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
}
else
{
project.together_with = null;
}
}
}
// var total = project.activity.Count;
// if (project.activity != null)
// {
// foreach (var v in project.activity)
// {
// if (v.activity != null)
// {
// //var total = project.activity.Select(r => r.count).Sum(t => t.Value);
// project.together_with = "ประกอบด้วยกิจกรรมหรือโครงการย่อย " + total + " โครงการดังนี้คือ";
// }
// else
// {
// project.together_with = null;
// }
// }
// }
if (project.eighth != null)
{
@@ -252,19 +252,18 @@ namespace rmutr_report.Controllers
report.Export(pdf, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/pdf");
break;
case "xls":
case "xlsx":
Excel2007Export excel = new Excel2007Export();
report.Export(excel, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "application/vnd.ms-excel");
break;
case "mht":
MHTExport mht = new MHTExport();
report.Export(mht, stream);
case "xlsx":
Excel2007Export excel1 = new Excel2007Export();
report.Export(excel1, stream);
stream.Seek(0, SeekOrigin.Begin);
return File(stream, "multipart/related");
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
break;
case "doc":
case "docx":