и снова изменения

This commit is contained in:
Дмитрий Блохин 2024-05-29 18:11:01 +04:00
parent ed24d5e00e
commit 6148e4c272
4 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@ namespace DatabaseImplement.Models
}
}
[ForeignKey("WorkshopId")]
public List<WorkerWorkshop> Workers { get; set; } = new();
public virtual List<WorkerWorkshop> Workers { get; set; } = new();
public static Workshop? Create(FactoryGoWorkDatabase context, WorkshopBindingModel model)
{
if(model == null)

View File

@ -460,7 +460,7 @@ namespace GuarantorAPP.Controllers
return RedirectToAction("WorkerProductChoose");
} catch
{
RedirectToAction("Error");
return RedirectToAction("Error");
}
}
public async Task<IActionResult> WordGenerate()
@ -497,7 +497,7 @@ namespace GuarantorAPP.Controllers
var value = HttpContext.Session.GetString("Workers");
if (value != null)
{
List<int> rawReports = value!.Split(',').Select(x => int.Parse(x)).ToList();
List<int> rawReports = value!.Split('/').Select(x => int.Parse(x)).ToList();
var reports = _data.GetProductReports(rawReports);
return View(reports);
}

View File

@ -8,6 +8,7 @@
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="IndexWorker">Работники</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="IndexMachine">Станки</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="IndexWorkshop">Цеха</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="ReportsMenu">Меню отчетов</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Личные данные</a>
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Logout">Выйти</a>
</div>

View File

@ -63,6 +63,7 @@
if (startDate > endDate) {
$('#endDateError').text('Дата окончания не может быть раньше даты начала.');
isValid = false;
}
}
return isValid;
}