Всё сломалось, ничего не понятно. Создаются преподаватели при создании ведмости
This commit is contained in:
parent
75ead823e8
commit
8dbce23517
@ -59,7 +59,7 @@
|
||||
@Html.DisplayFor(modelItem => item.Date)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.TeacherId)
|
||||
@Html.DisplayFor(modelItem => item.TeacherName)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
@ -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("Дата оформления ведомости")]
|
||||
|
@ -21,7 +21,7 @@ namespace UniversityRestApi.Controllers
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public List<StatementViewModel>? GetStatements(int teacherId)
|
||||
public List<StatementViewModel>? 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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user