First Commit

This commit is contained in:
Daniel Wathen
2022-11-30 13:15:01 -07:00
commit f996dcfb36
105 changed files with 76792 additions and 0 deletions

View 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();
}
}
}