50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using EmployeeManagmentBusinessLogic.BusinessLogic;
|
|
using EmployeeManagmentContracts.BusinessLogicContracts;
|
|
using EmployeeManagmentContracts.ViewModels;
|
|
using System.Windows;
|
|
|
|
namespace EmployeeManagmentView
|
|
{
|
|
public partial class MainWindow : Window
|
|
{
|
|
private readonly IPhisicalPersonLogic _phisicalPersonLogic;
|
|
private readonly IEmployeeLogic _employeeLogic;
|
|
|
|
// Constructor with Dependency Injection
|
|
public MainWindow(IPhisicalPersonLogic phisicalPersonLogic, IEmployeeLogic employeeLogic)
|
|
{
|
|
_phisicalPersonLogic = phisicalPersonLogic;
|
|
_employeeLogic = employeeLogic;
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void ViewEmployees_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// Логика для открытия окна просмотра сотрудников
|
|
var employeesWindow = new EmployeesWindow();
|
|
employeesWindow.Show();
|
|
}
|
|
|
|
private void ViewPhisicalPerson_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// Передаем логику в конструктор окна
|
|
var phisicalPersonWindow = new PhisicalPersonWindow(_phisicalPersonLogic);
|
|
phisicalPersonWindow.Show();
|
|
}
|
|
|
|
private void ManageSalaries_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// Логика для открытия окна управления зарплатами
|
|
var salariesWindow = new SalariesWindow();
|
|
salariesWindow.Show();
|
|
}
|
|
|
|
private void ManageVacations_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
// Логика для открытия окна управления отпусками
|
|
var vacationsWindow = new VacationsWindow();
|
|
vacationsWindow.Show();
|
|
}
|
|
}
|
|
}
|