180 lines
4.3 KiB
C#
180 lines
4.3 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using ServiceStationContracts.BindingModels;
|
|
using ServiceStationGuarantorApp.Models;
|
|
using System.Diagnostics;
|
|
|
|
namespace ServiceStationGuarantorApp.Controllers
|
|
{
|
|
public class HomeController : Controller
|
|
{
|
|
private readonly ILogger<HomeController> _logger;
|
|
|
|
public HomeController(ILogger<HomeController> logger)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
public IActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Privacy()
|
|
{
|
|
//if (APIGuarantor.Guarantor == null)
|
|
//{
|
|
// return Redirect("~/Home/Enter");
|
|
//}
|
|
return View();
|
|
}
|
|
|
|
//[HttpPost]
|
|
//public void Privacy(string number, string email, string FIO, string password)
|
|
//{
|
|
// if (APIGuarantor.Guarantor == null)
|
|
// {
|
|
// throw new Exception("Вы как сюда попали? Сюда вход только авторизованным");
|
|
// }
|
|
// if (string.IsNullOrEmpty(number) || string.IsNullOrEmpty(FIO) || string.IsNullOrEmpty(password))
|
|
// {
|
|
// throw new Exception("Введите номер, ФИО и пароль");
|
|
// }
|
|
// APIGuarantor.PostRequest("api/guarantor/updatedata", new GuarantorBindingModel
|
|
// {
|
|
// Id = APIGuarantor.Guarantor.Id,
|
|
// GuarantorNumber = number,
|
|
// GuarantorEmail = email,
|
|
// GuarantorFIO = FIO,
|
|
// GuarantorPassword = password,
|
|
// });
|
|
|
|
// APIGuarantor.Guarantor.GuarantorNumber = number;
|
|
// APIGuarantor.Guarantor.GuarantorEmail = email;
|
|
// APIGuarantor.Guarantor.GuarantorFIO = FIO;
|
|
// APIGuarantor.Guarantor.GuarantorPassword = password;
|
|
// Response.Redirect("Index");
|
|
//}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult Error()
|
|
{
|
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Enter()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
public IActionResult Register()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult ListDefectSparePartToFile()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult ListSparePartsToPdfFile()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult ListSpareParts()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult ListRepairs()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult ListWorks()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult CreateSparePart()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult UpdateSparePart()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult DeleteSparePart()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult CreateRepair()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult UpdateRepair() {
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult DeleteRepair()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult AddSparepartToRepair()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult CreateWork()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult UpdateWork()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult DeleteWork()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult AddSparepartToWork()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult BindingRepairToDefects()
|
|
{
|
|
return View();
|
|
}
|
|
}
|
|
}
|