2024-04-30 16:56:58 +04:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using PolyclinicWebAppImplementer.Models;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
|
|
namespace PolyclinicWebAppImplementer.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class HomeController : Controller
|
|
|
|
|
{
|
|
|
|
|
private readonly ILogger<HomeController> _logger;
|
|
|
|
|
|
|
|
|
|
public HomeController(ILogger<HomeController> logger)
|
|
|
|
|
{
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult Index()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2024-04-30 17:27:10 +04:00
|
|
|
|
[HttpGet]
|
|
|
|
|
[HttpPost]
|
2024-04-30 16:56:58 +04:00
|
|
|
|
public IActionResult Course()
|
|
|
|
|
{
|
2024-04-30 17:27:10 +04:00
|
|
|
|
if (HttpContext.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
return Redirect("~/Home/Courses");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2024-04-30 16:56:58 +04:00
|
|
|
|
}
|
|
|
|
|
public IActionResult Courses()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
public IActionResult Diagnose()
|
|
|
|
|
{
|
2024-04-30 17:27:10 +04:00
|
|
|
|
if (HttpContext.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
return Redirect("~/Home/Diagnoses");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2024-04-30 16:56:58 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult Diagnoses()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
public IActionResult Symptom()
|
|
|
|
|
{
|
2024-04-30 17:27:10 +04:00
|
|
|
|
if (HttpContext.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
return Redirect("~/Home/Symptomes");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2024-04-30 16:56:58 +04:00
|
|
|
|
}
|
|
|
|
|
public IActionResult Symptomes()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-30 21:05:53 +04:00
|
|
|
|
public IActionResult Privacy()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-30 21:55:00 +04:00
|
|
|
|
[HttpGet]
|
|
|
|
|
[HttpPost]
|
2024-04-30 21:05:53 +04:00
|
|
|
|
public IActionResult Login()
|
|
|
|
|
{
|
2024-04-30 21:55:00 +04:00
|
|
|
|
if (HttpContext.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
return Redirect("~/");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2024-04-30 21:05:53 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult Register()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-30 23:22:25 +04:00
|
|
|
|
[HttpGet]
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public IActionResult AddRecipeToCourse()
|
|
|
|
|
{
|
|
|
|
|
if (HttpContext.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
return Redirect("~/");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-01 00:16:50 +04:00
|
|
|
|
[HttpGet]
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public IActionResult GetMedicamentsByDiagnoses()
|
|
|
|
|
{
|
|
|
|
|
if (HttpContext.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-01 12:52:50 +04:00
|
|
|
|
[HttpGet]
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public IActionResult DiagnosesReport()
|
|
|
|
|
{
|
|
|
|
|
if (HttpContext.Request.Method == "POST")
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-01 00:16:50 +04:00
|
|
|
|
|
2024-04-30 16:56:58 +04:00
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
|
|
|
public IActionResult Error()
|
|
|
|
|
{
|
|
|
|
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|