diff --git a/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml b/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml
index 5368d66..85c4d70 100644
--- a/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml
+++ b/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml
@@ -70,11 +70,6 @@
-
-
-
-
-
diff --git a/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml.cs b/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml.cs
index 06d1601..498dc29 100644
--- a/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml.cs
+++ b/EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml.cs
@@ -32,7 +32,6 @@ namespace EmployeeManagmentView.Employee.Salary
_employeeLogic = employeeLogic;
InitializeComponent();
LoadSalaries();
- LoadEmployees();
}
private void LoadSalaries()
@@ -43,14 +42,6 @@ namespace EmployeeManagmentView.Employee.Salary
SalaryComboBox.SelectedValuePath = "Id";
}
- private void LoadEmployees()
- {
- _employees = _employeeLogic.GetFullList(); // Получение списка всех сотрудников
- EmployeeComboBox.ItemsSource = _employees;
- EmployeeComboBox.DisplayMemberPath = "FullName"; // Предполагается, что у сотрудника есть свойство FullName
- EmployeeComboBox.SelectedValuePath = "Id";
- }
-
private void SalaryComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (SalaryComboBox.SelectedValue is int selectedSalaryId)
@@ -69,9 +60,6 @@ namespace EmployeeManagmentView.Employee.Salary
PremiumTextBox.Text = salary.Premium?.ToString() ?? string.Empty;
DatePicker.SelectedDate = salary.Date;
PassedCheckBox.IsChecked = salary.Passed;
-
- // Устанавливаем выбранного сотрудника
- EmployeeComboBox.SelectedValue = salary.EmployeeId;
}
else
{
@@ -103,7 +91,6 @@ namespace EmployeeManagmentView.Employee.Salary
Premium = float.TryParse(PremiumTextBox.Text, out var premium) ? premium : (float?)null,
Date = DatePicker.SelectedDate.Value.ToUniversalTime(),
Passed = PassedCheckBox.IsChecked ?? false,
- EmployeeId = (int?)EmployeeComboBox.SelectedValue // Устанавливаем выбранного сотрудника
};
_salaryLogic.Update(updatedSalary);
diff --git a/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml b/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml
index d52dcb4..5598f49 100644
--- a/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml
+++ b/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml
@@ -62,10 +62,6 @@
-
-
-
-
diff --git a/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml.cs b/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml.cs
index b0b4ee8..00066d1 100644
--- a/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml.cs
+++ b/EmployeeManagmentView/Employee/Vacation/EditVacationWindow.xaml.cs
@@ -32,7 +32,6 @@ namespace EmployeeManagmentView.Employee.Vacation
_employeeLogic = employeeLogic;
InitializeComponent();
LoadVacations();
- LoadEmployees();
}
private void LoadVacations()
@@ -43,14 +42,6 @@ namespace EmployeeManagmentView.Employee.Vacation
VacationComboBox.SelectedValuePath = "Id";
}
- private void LoadEmployees()
- {
- _employees = _employeeLogic.GetFullList(); // Получение списка всех сотрудников
- EmployeeComboBox.ItemsSource = _employees;
- EmployeeComboBox.DisplayMemberPath = "FullName"; // Предполагается, что у сотрудника есть свойство FullName
- EmployeeComboBox.SelectedValuePath = "Id";
- }
-
private void VacationComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (VacationComboBox.SelectedValue is int selectedVacationId)
@@ -68,8 +59,6 @@ namespace EmployeeManagmentView.Employee.Vacation
EndDatePicker.SelectedDate = vacation.EndData;
PassedCheckBox.IsChecked = vacation.Passed;
- // Устанавливаем выбранного сотрудника
- EmployeeComboBox.SelectedValue = vacation.EmployeeId;
}
else
{
@@ -99,7 +88,6 @@ namespace EmployeeManagmentView.Employee.Vacation
StartData = StartDatePicker.SelectedDate.Value.ToUniversalTime(),
EndData = EndDatePicker.SelectedDate.Value.ToUniversalTime(),
Passed = PassedCheckBox.IsChecked ?? false,
- EmployeeId = (int?)EmployeeComboBox.SelectedValue // Устанавливаем выбранного сотрудника
};
_vacationLogic.Update(updatedVacation);