100 lines
2.9 KiB
C#
100 lines
2.9 KiB
C#
using EmployeeManagmentBusinessLogic.BusinessLogic;
|
|
using EmployeeManagmentContracts.BusinessLogicContracts;
|
|
using EmployeeManagmentContracts.ViewModels;
|
|
using EmployeeManagmentView.Employee.Vacation;
|
|
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
|
|
{
|
|
/// <summary>
|
|
/// Логика взаимодействия для SalaryManagementWindow.xaml
|
|
/// </summary>
|
|
public partial class SalaryManagementWindow : Window
|
|
{
|
|
|
|
private readonly ISalaryLogic _salaryLogic;
|
|
private readonly IEmployeeLogic _employeeLogic;
|
|
|
|
public SalaryManagementWindow(ISalaryLogic salaryLogic, IEmployeeLogic employeeLogic)
|
|
{
|
|
|
|
_salaryLogic = salaryLogic;
|
|
_employeeLogic = employeeLogic;
|
|
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OpenAddSalaryWindow(object sender, RoutedEventArgs e)
|
|
{
|
|
foreach (Window window in Application.Current.Windows)
|
|
{
|
|
if (window is AddSalaryWindow existingWindow)
|
|
{
|
|
existingWindow.Activate();
|
|
return;
|
|
}
|
|
}
|
|
|
|
var addWindow = new AddSalaryWindow(_salaryLogic, _employeeLogic);
|
|
addWindow.Show();
|
|
}
|
|
|
|
private void OpenDeleteSalaryWindow(object sender, RoutedEventArgs e)
|
|
{
|
|
foreach (Window window in Application.Current.Windows)
|
|
{
|
|
if (window is DeleteSalaryWindow existingWindow)
|
|
{
|
|
existingWindow.Activate();
|
|
return;
|
|
}
|
|
}
|
|
|
|
var deleteWindow = new DeleteSalaryWindow(_salaryLogic);
|
|
deleteWindow.Show();
|
|
}
|
|
|
|
private void OpenEditSalaryWindow(object sender, RoutedEventArgs e)
|
|
{
|
|
foreach (Window window in Application.Current.Windows)
|
|
{
|
|
if (window is EditSalaryWindow existingWindow)
|
|
{
|
|
existingWindow.Activate();
|
|
return;
|
|
}
|
|
}
|
|
|
|
var editWindow = new EditSalaryWindow(_salaryLogic);
|
|
editWindow.Show();
|
|
}
|
|
|
|
private void OpenViewSalaryWindow(object sender, RoutedEventArgs e)
|
|
{
|
|
foreach (Window window in Application.Current.Windows)
|
|
{
|
|
if (window is ViewSalaryWindow existingWindow)
|
|
{
|
|
existingWindow.Activate();
|
|
return;
|
|
}
|
|
}
|
|
|
|
var viewWindow = new ViewSalaryWindow(_salaryLogic);
|
|
viewWindow.Show();
|
|
}
|
|
}
|
|
}
|