diff --git a/University/UniversityClientApp/Views/Home/Statements.cshtml b/University/UniversityClientApp/Views/Home/Statements.cshtml
index 9633069..54ed18b 100644
--- a/University/UniversityClientApp/Views/Home/Statements.cshtml
+++ b/University/UniversityClientApp/Views/Home/Statements.cshtml
@@ -59,7 +59,7 @@
@Html.DisplayFor(modelItem => item.Date)
- @Html.DisplayFor(modelItem => item.TeacherId)
+ @Html.DisplayFor(modelItem => item.TeacherName)
|
}
diff --git a/University/UniversityContracts/ViewModels/StatementViewModel.cs b/University/UniversityContracts/ViewModels/StatementViewModel.cs
index 4a2def6..ddfc4a3 100644
--- a/University/UniversityContracts/ViewModels/StatementViewModel.cs
+++ b/University/UniversityContracts/ViewModels/StatementViewModel.cs
@@ -13,6 +13,7 @@ namespace UniversityContracts.ViewModels
public int Id { get; set; }
public int UserId { get; set; }
public int TeacherId { get; set; }
+ public string TeacherName { get; set; } = string.Empty;
[DisplayName("Название ведомости")]
public string Name { get; set; } = string.Empty;
[DisplayName("Дата оформления ведомости")]
diff --git a/University/UniversityRestApi/Controllers/StatementController.cs b/University/UniversityRestApi/Controllers/StatementController.cs
index 1f85990..04e8857 100644
--- a/University/UniversityRestApi/Controllers/StatementController.cs
+++ b/University/UniversityRestApi/Controllers/StatementController.cs
@@ -21,7 +21,7 @@ namespace UniversityRestApi.Controllers
}
[HttpGet]
- public List? GetStatements(int teacherId)
+ public List? GetStatements(int teacherId, int userId)
{
try
{
@@ -29,7 +29,7 @@ namespace UniversityRestApi.Controllers
{
return _logic.ReadList(null);
}
- return _logic.ReadList(new StatementSearchModel { TeacherId = teacherId });
+ return _logic.ReadList(new StatementSearchModel { TeacherId = teacherId, UserId = userId });
}
catch (Exception ex)
{
@@ -38,7 +38,6 @@ namespace UniversityRestApi.Controllers
}
}
-
[HttpPost]
public void CreateStatement(StatementBindingModel model)
{