diff --git a/EmployeeManagmentView/Employee/EmployeeManagementWindow.xaml.cs b/EmployeeManagmentView/Employee/EmployeeManagementWindow.xaml.cs
index 379b655..ca0cb02 100644
--- a/EmployeeManagmentView/Employee/EmployeeManagementWindow.xaml.cs
+++ b/EmployeeManagmentView/Employee/EmployeeManagementWindow.xaml.cs
@@ -25,11 +25,15 @@ namespace EmployeeManagmentView.Employee
private readonly IEmployeeLogic _employeeLogic;
private readonly IPhisicalPersonLogic _phisicalPersonLogic;
+ private readonly ISalaryLogic _salaryLogic;
+ private readonly IVacationLogic _vacationLogic;
- public EmployeeManagementWindow(IEmployeeLogic employeeLogic, IPhisicalPersonLogic phisicalPersonLogic)
+ public EmployeeManagementWindow(IEmployeeLogic employeeLogic, IPhisicalPersonLogic phisicalPersonLogic, ISalaryLogic salaryLogic, IVacationLogic vacationLogic)
{
_employeeLogic = employeeLogic;
_phisicalPersonLogic = phisicalPersonLogic;
+ _salaryLogic = salaryLogic;
+ _vacationLogic = vacationLogic;
InitializeComponent();
}
@@ -89,7 +93,7 @@ namespace EmployeeManagmentView.Employee
}
}
- var viewWindow = new ViewEmployeeWindow(_employeeLogic);
+ var viewWindow = new ViewEmployeeWindow(_employeeLogic, _salaryLogic, _vacationLogic);
viewWindow.Show();
}
}
diff --git a/EmployeeManagmentView/Employee/Salary/SalaryManagementWindow.xaml b/EmployeeManagmentView/Employee/Salary/SalaryManagementWindow.xaml
new file mode 100644
index 0000000..6e554c9
--- /dev/null
+++ b/EmployeeManagmentView/Employee/Salary/SalaryManagementWindow.xaml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EmployeeManagmentView/Employee/Salary/SalaryManagementWindow.xaml.cs b/EmployeeManagmentView/Employee/Salary/SalaryManagementWindow.xaml.cs
new file mode 100644
index 0000000..ae65796
--- /dev/null
+++ b/EmployeeManagmentView/Employee/Salary/SalaryManagementWindow.xaml.cs
@@ -0,0 +1,36 @@
+using EmployeeManagmentContracts.BusinessLogicContracts;
+using EmployeeManagmentContracts.ViewModels;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace EmployeeManagmentView.Employee.Salary
+{
+ ///
+ /// Логика взаимодействия для SalaryManagementWindow.xaml
+ ///
+ public partial class SalaryManagementWindow : Window
+ {
+
+ private readonly ISalaryLogic _salaryLogic;
+
+ public SalaryManagementWindow(ISalaryLogic salaryLogic)
+ {
+
+ _salaryLogic = salaryLogic;
+
+ InitializeComponent();
+
+ }
+ }
+}
diff --git a/EmployeeManagmentView/Employee/Vacation/VacationManagementWindow.xaml b/EmployeeManagmentView/Employee/Vacation/VacationManagementWindow.xaml
new file mode 100644
index 0000000..a6af8c5
--- /dev/null
+++ b/EmployeeManagmentView/Employee/Vacation/VacationManagementWindow.xaml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/EmployeeManagmentView/Employee/Vacation/VacationManagementWindow.xaml.cs b/EmployeeManagmentView/Employee/Vacation/VacationManagementWindow.xaml.cs
new file mode 100644
index 0000000..7603ddd
--- /dev/null
+++ b/EmployeeManagmentView/Employee/Vacation/VacationManagementWindow.xaml.cs
@@ -0,0 +1,36 @@
+using EmployeeManagmentBusinessLogic.BusinessLogic;
+using EmployeeManagmentContracts.BusinessLogicContracts;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace EmployeeManagmentView.Employee.Vacation
+{
+ ///
+ /// Логика взаимодействия для VacationManagementWindow.xaml
+ ///
+ public partial class VacationManagementWindow : Window
+ {
+
+ private readonly IVacationLogic _vacationLogic;
+
+ public VacationManagementWindow(IVacationLogic vacationLogic)
+ {
+
+ _vacationLogic = vacationLogic;
+
+ InitializeComponent();
+
+ }
+ }
+}
diff --git a/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml b/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml
index 653d7fa..9496b66 100644
--- a/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml
+++ b/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml
@@ -26,7 +26,7 @@
@@ -39,5 +39,23 @@
+
+
+
+
\ No newline at end of file
diff --git a/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml.cs b/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml.cs
index 4d6d738..f716219 100644
--- a/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml.cs
+++ b/EmployeeManagmentView/Employee/ViewEmployeeWindow.xaml.cs
@@ -1,5 +1,8 @@
-using EmployeeManagmentContracts.BusinessLogicContracts;
+using EmployeeManagmentBusinessLogic.BusinessLogic;
+using EmployeeManagmentContracts.BusinessLogicContracts;
using EmployeeManagmentContracts.ViewModels;
+using EmployeeManagmentView.Employee.Salary;
+using EmployeeManagmentView.Employee.Vacation;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -23,11 +26,15 @@ namespace EmployeeManagmentView.Employee
{
private readonly IEmployeeLogic _employeeLogic;
+ private readonly ISalaryLogic _salaryLogic;
+ private readonly IVacationLogic _vacationLogic;
private IEnumerable _allEmployees; // Список сотрудников для фильтрации
- public ViewEmployeeWindow(IEmployeeLogic employeeLogic)
+ public ViewEmployeeWindow(IEmployeeLogic employeeLogic, ISalaryLogic salaryLogic, IVacationLogic vacationLogic)
{
_employeeLogic = employeeLogic;
+ _salaryLogic = salaryLogic;
+ _vacationLogic = vacationLogic;
InitializeComponent();
LoadEmployees();
}
@@ -63,5 +70,43 @@ namespace EmployeeManagmentView.Employee
EmployeesDataGrid.ItemsSource = filteredList;
}
}
+
+ private void OpenSalaryManagementWindow(object sender, RoutedEventArgs e)
+ {
+ foreach (Window window in Application.Current.Windows)
+ {
+ if (window is SalaryManagementWindow)
+ {
+ // Если окно уже открыто, активируем его и ставим на передний план
+ window.Activate();
+ window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ window.Topmost = true; // Ставим окно на передний план
+ window.Topmost = false; // Сразу снимаем флаг, чтобы окно не оставалось всегда наверху
+ return;
+ }
+ }
+
+ var salaryWindow = new SalaryManagementWindow(_salaryLogic);
+ salaryWindow.Show();
+ }
+
+ private void OpenVacationManagementWindow(object sender, RoutedEventArgs e)
+ {
+ foreach (Window window in Application.Current.Windows)
+ {
+ if (window is VacationManagementWindow)
+ {
+ // Если окно уже открыто, активируем его и ставим на передний план
+ window.Activate();
+ window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ window.Topmost = true; // Ставим окно на передний план
+ window.Topmost = false; // Сразу снимаем флаг, чтобы окно не оставалось всегда наверху
+ return;
+ }
+ }
+
+ var vacationWindow = new VacationManagementWindow(_vacationLogic);
+ vacationWindow.Show();
+ }
}
}
diff --git a/EmployeeManagmentView/MainWindow.xaml.cs b/EmployeeManagmentView/MainWindow.xaml.cs
index b4744d9..0133f2a 100644
--- a/EmployeeManagmentView/MainWindow.xaml.cs
+++ b/EmployeeManagmentView/MainWindow.xaml.cs
@@ -12,12 +12,16 @@ namespace EmployeeManagmentView
private readonly IEmployeeLogic _employeeLogic;
private readonly IPhisicalPersonLogic _phisicalPersonLogic;
+ private readonly ISalaryLogic _salaryLogic;
+ private readonly IVacationLogic _vacationLogic;
// Constructor with Dependency Injection
- public MainWindow(IEmployeeLogic employeeLogic, IPhisicalPersonLogic phisicalPersonLogic)
+ public MainWindow(IEmployeeLogic employeeLogic, IPhisicalPersonLogic phisicalPersonLogic, ISalaryLogic salaryLogic, IVacationLogic vacationLogic)
{
_employeeLogic = employeeLogic;
_phisicalPersonLogic = phisicalPersonLogic;
+ _salaryLogic = salaryLogic;
+ _vacationLogic = vacationLogic;
InitializeComponent();
}
@@ -55,7 +59,7 @@ namespace EmployeeManagmentView
}
}
- var employeeWindow = new EmployeeManagementWindow(_employeeLogic, _phisicalPersonLogic);
+ var employeeWindow = new EmployeeManagementWindow(_employeeLogic, _phisicalPersonLogic, _salaryLogic, _vacationLogic);
employeeWindow.Show();
}
diff --git a/EmployeeManagmentView/PhysicalPerson/ViewPhysicalPersonsWindow.xaml b/EmployeeManagmentView/PhysicalPerson/ViewPhysicalPersonsWindow.xaml
index d92eef3..62d0432 100644
--- a/EmployeeManagmentView/PhysicalPerson/ViewPhysicalPersonsWindow.xaml
+++ b/EmployeeManagmentView/PhysicalPerson/ViewPhysicalPersonsWindow.xaml
@@ -40,5 +40,6 @@
+