diff --git a/EmployeeManagmentContracts/ViewModels/PhisicalPersonViewModel.cs b/EmployeeManagmentContracts/ViewModels/PhisicalPersonViewModel.cs index b5fca96..632cea2 100644 --- a/EmployeeManagmentContracts/ViewModels/PhisicalPersonViewModel.cs +++ b/EmployeeManagmentContracts/ViewModels/PhisicalPersonViewModel.cs @@ -16,5 +16,12 @@ namespace EmployeeManagmentContracts.ViewModels public string Gender { get; set; } = string.Empty; public string Address { get; set; } = string.Empty; public string Telephone { get; set; } = string.Empty; + + // Вычисляемое свойство для полного имени + public string FullName => $"{Surname} {Name} {Patronymic}"; + + // Вычисляемое свойство для полного имени с датой рождения + public string FullNameWithBirthday => $"{Surname} {Name} {Patronymic} ({Birthday:dd.MM.yyyy})"; + } } diff --git a/EmployeeManagmentView/PhysicalPerson/EditPhysicalPersonWindow.xaml.cs b/EmployeeManagmentView/PhysicalPerson/EditPhysicalPersonWindow.xaml.cs index 50b8ec8..ea18150 100644 --- a/EmployeeManagmentView/PhysicalPerson/EditPhysicalPersonWindow.xaml.cs +++ b/EmployeeManagmentView/PhysicalPerson/EditPhysicalPersonWindow.xaml.cs @@ -23,8 +23,8 @@ namespace EmployeeManagmentView.PhysicalPerson { _physicalPersons = _phisicalPersonLogic.GetFullList(); PhysicalPersonComboBox.ItemsSource = _physicalPersons; - PhysicalPersonComboBox.DisplayMemberPath = "Name"; // "FullName" - свойство с именем - PhysicalPersonComboBox.SelectedValuePath = "Id"; // "Id" - идентификатор физ.лица + PhysicalPersonComboBox.DisplayMemberPath = "FullNameWithBirthday"; + PhysicalPersonComboBox.SelectedValuePath = "Id"; } // Событие при выборе физ.лица