This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user