diff --git a/UniversityView/FormMain.cs b/UniversityView/FormMain.cs index eaf868e..ffc3d73 100644 --- a/UniversityView/FormMain.cs +++ b/UniversityView/FormMain.cs @@ -161,7 +161,7 @@ namespace UniversityView List columnDefinitions = new() { - new ColumnDefinition { Header = "Идентификатор", PropertyName = "Id", Width = 11 }, + new ColumnDefinition { Header = "ID", PropertyName = "Id", Width = 11 }, new ColumnDefinition { Header = "Личные данные", PropertyName = "PersonalData", Width = 11 }, new ColumnDefinition { Header = "Личные данные", PropertyName = "PersonalData1", Width = 11 }, new ColumnDefinition { Header = "Направление", PropertyName = "DirectionName", Width = 21 } @@ -169,7 +169,7 @@ namespace UniversityView List columnDefinitions2 = new() { - new ColumnDefinition { Header = "Идентификатор", PropertyName = "Id", Width = 11 }, + new ColumnDefinition { Header = "ID", PropertyName = "Id", Width = 11 }, new ColumnDefinition { Header = "ФИО", PropertyName = "FIO", Width = 11 }, new ColumnDefinition { Header = "Электронная почта", PropertyName = "Email", Width = 70 }, new ColumnDefinition { Header = "Направление", PropertyName = "DirectionName", Width = 21 } @@ -222,7 +222,11 @@ namespace UniversityView int count = 0; for (int j = 0; j < listStudents.Count; j++) { - if (listStudents[j].DirectionName == listDirections[i].Name) count++; + string[] dirs = listStudents[j].DirectionName.Split(";"); + foreach (var dir in dirs) + { + if (dir == listDirections[i].Name) count++; + } } data.Add((listDirections[i].Name, count)); } @@ -254,6 +258,7 @@ namespace UniversityView { form.ShowDialog(); } + LoadData(); } } }