PIbd-42_Kashin_M.I_CPO_Cour.../EmployeeManagmentView/MainWindow.xaml.cs

32 lines
998 B
C#

using EmployeeManagmentBusinessLogic.BusinessLogic;
using EmployeeManagmentContracts.BusinessLogicContracts;
using EmployeeManagmentContracts.ViewModels;
using EmployeeManagmentView.PhysicalPerson;
using System.Windows;
namespace EmployeeManagmentView
{
public partial class MainWindow : Window
{
private readonly IEmployeeLogic _employeeLogic;
private readonly IPhisicalPersonLogic _phisicalPersonLogic;
// Constructor with Dependency Injection
public MainWindow(IEmployeeLogic employeeLogic, IPhisicalPersonLogic phisicalPersonLogic)
{
_employeeLogic = employeeLogic;
_phisicalPersonLogic = phisicalPersonLogic;
InitializeComponent();
}
private void OpenPhysicalPersonManagementWindow(object sender, RoutedEventArgs e)
{
var physicalPersonWindow = new PhysicalPersonManagementWindow(_phisicalPersonLogic);
physicalPersonWindow.Show();
}
}
}