First Commit
This commit is contained in:
52
ReportingServices/Controllers/ProductionReportController.cs
Normal file
52
ReportingServices/Controllers/ProductionReportController.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ReportingServices.HelperClasses;
|
||||
using ReportingServices.Models.ProductionReport;
|
||||
using ReportingServices.ReportingObjects;
|
||||
|
||||
namespace ReportingServices.Controllers
|
||||
{
|
||||
public class ProductionReportController : Controller
|
||||
{
|
||||
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult DailyReport()
|
||||
{
|
||||
APICaller caller = new APICaller();
|
||||
caller.CallAllAPIs();
|
||||
|
||||
DailyReport dailyReport = new DailyReport(caller.OutsByDay, caller.ScrapByDay, caller.ToolAvailibilityByTypes, caller.ToolStateByTypes);
|
||||
|
||||
return View(dailyReport);
|
||||
}
|
||||
|
||||
public IActionResult EditDailyReport()
|
||||
{
|
||||
XMLReader xmlReader = new XMLReader();
|
||||
|
||||
DailyReportingSummary rpt = xmlReader.LoadJSONFile();
|
||||
|
||||
return View(rpt);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult EditDailyReport(DailyReportingSummary rpt)
|
||||
{
|
||||
XMLReader xmlReader = new XMLReader();
|
||||
|
||||
//xmlReader.SaveXMLFile(rpt);
|
||||
xmlReader.SaveJSONFile(rpt);
|
||||
|
||||
return RedirectToAction("DailyReport");
|
||||
}
|
||||
|
||||
public IActionResult Headcount()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user