Ready to Test
This commit is contained in:
49
Archive/Controllers/PagesController.cs
Normal file
49
Archive/Controllers/PagesController.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using OI.Metrology.Shared.Repositories;
|
||||
using OI.Metrology.Shared.ViewModels;
|
||||
using System;
|
||||
|
||||
namespace OI.Metrology.Archive.Controllers;
|
||||
|
||||
//[Authorize]
|
||||
public class PagesController : Controller
|
||||
{
|
||||
protected IMetrologyRepo _Repo;
|
||||
|
||||
public PagesController(IMetrologyRepo repo) => _Repo = repo;
|
||||
|
||||
[HttpGet]
|
||||
[Route("/")]
|
||||
public IActionResult Index() =>
|
||||
//return View("Home");
|
||||
View("RunHeaders");
|
||||
|
||||
[HttpGet]
|
||||
[Route("/AwaitingDispo")]
|
||||
public IActionResult AwaitingDispo() => View();
|
||||
|
||||
[HttpGet]
|
||||
[Route("/RunInfo")]
|
||||
public IActionResult RunInfo([FromQuery] int tooltypeid = 1, [FromQuery] int headerid = 0)
|
||||
{
|
||||
RunInfo m = new()
|
||||
{
|
||||
ToolTypeID = tooltypeid,
|
||||
HeaderID = headerid,
|
||||
HeaderAttachmentID = Guid.Empty,
|
||||
};
|
||||
if (headerid > 0)
|
||||
{
|
||||
m.HeaderAttachmentID = _Repo.GetHeaderAttachmentID(tooltypeid, headerid);
|
||||
}
|
||||
return View(m);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("/RunHeaders")]
|
||||
public IActionResult RunHeaders() => View();
|
||||
|
||||
[HttpGet]
|
||||
[Route("/Crash")]
|
||||
public IActionResult Crash() => throw new Exception("Test unhandled exception");
|
||||
}
|
Reference in New Issue
Block a user