diff --git a/View/PhysicalPerson/AddPhysicalPersonWindow.xaml b/View/PhysicalPerson/AddPhysicalPersonWindow.xaml
index e120f84..b88ab13 100644
--- a/View/PhysicalPerson/AddPhysicalPersonWindow.xaml
+++ b/View/PhysicalPerson/AddPhysicalPersonWindow.xaml
@@ -22,57 +22,62 @@
Width="250" Height="40"
Style="{StaticResource RoundedTextBoxStyle}"
Margin="0,10"
- ToolTip="Введите имя" />
+ ToolTip="Введите имя"
+ Text="{Binding NamePhysicalPersons}"/>
+ ToolTip="Введите фамилию"
+ Text="{Binding SurnamePhysicalPersons}"/>
+ ToolTip="Введите отчество"
+ Text="{Binding PatronomicPhysicalPersons}"/>
+ ToolTip="Выберите дату рождения"
+ Text="{Binding Birthday}"/>
-
- Мужской
- Женский
-
+
+ ToolTip="Введите адрес"
+ Text="{Binding Address}"/>
+ ToolTip="Введите номер телефона"
+ Text="{Binding Telephone}"/>
+ Style="{StaticResource RoundedButtonStyle}"
+ Command="{Binding AddNewPhysicalPerson}"/>
\ No newline at end of file
diff --git a/View/PhysicalPerson/AddPhysicalPersonWindow.xaml.cs b/View/PhysicalPerson/AddPhysicalPersonWindow.xaml.cs
index b5cc73d..43104e9 100644
--- a/View/PhysicalPerson/AddPhysicalPersonWindow.xaml.cs
+++ b/View/PhysicalPerson/AddPhysicalPersonWindow.xaml.cs
@@ -1,4 +1,5 @@
-using System;
+using EmployeeManager.ViewModel;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -22,6 +23,7 @@ namespace EmployeeManager.View.PhysicalPerson
public AddPhysicalPersonWindow()
{
InitializeComponent();
+ DataContext = new DataManageViewModel();
}
}
}
diff --git a/ViewModel/DataManageViewModel.cs b/ViewModel/DataManageViewModel.cs
index 7a1cd52..de74f23 100644
--- a/ViewModel/DataManageViewModel.cs
+++ b/ViewModel/DataManageViewModel.cs
@@ -25,6 +25,37 @@ namespace EmployeeManager.ViewModel
+ public string NamePhysicalPersons { get; set; } = string.Empty;
+ public string SurnamePhysicalPersons { get; set; } = string.Empty;
+ public string PatronomicPhysicalPersons { get; set; } = string.Empty;
+ public DateTime Birthday { get; set; }
+ public string Gender { get; set; } = string.Empty;
+ public string Address { get; set; } = string.Empty;
+ public string Telephone { get; set; } = string.Empty;
+
+
+
+
+
+ private RelayCommand addNewPhysicalPerson;
+ public RelayCommand AddNewPhysicalPerson
+ {
+ get
+ {
+ return addNewPhysicalPerson ?? new RelayCommand(obj =>
+ {
+ string resultStr = "";
+
+ resultStr = DataWorker.CreatePhysicalPerson(NamePhysicalPersons, SurnamePhysicalPersons, PatronomicPhysicalPersons, Birthday, Gender, Address, Telephone);
+ }
+ );
+ }
+ }
+
+
+
+
+
private RelayCommand openPhysicalPersoManagementWindow;
public RelayCommand OpenPhysicalPersoManagementWindow
{