Добавил куча окон для CRUD зарплат и отпусков
This commit is contained in:
parent
eaf9cdb71d
commit
1cca9432eb
12
EmployeeManagmentView/Employee/Salary/AddSalaryWindow.xaml
Normal file
12
EmployeeManagmentView/Employee/Salary/AddSalaryWindow.xaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Salary.AddSalaryWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Salary"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="AddSalaryWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для AddSalaryWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AddSalaryWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly ISalaryLogic _salaryLogic;
|
||||||
|
|
||||||
|
public AddSalaryWindow(ISalaryLogic salaryLogic)
|
||||||
|
{
|
||||||
|
_salaryLogic = salaryLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Salary.DeleteSalaryWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Salary"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="DeleteSalaryWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,32 @@
|
|||||||
|
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.Salary
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для DeleteSalaryWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class DeleteSalaryWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly ISalaryLogic _salaryLogic;
|
||||||
|
|
||||||
|
public DeleteSalaryWindow(ISalaryLogic salaryLogic)
|
||||||
|
{
|
||||||
|
_salaryLogic = salaryLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml
Normal file
12
EmployeeManagmentView/Employee/Salary/EditSalaryWindow.xaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Salary.EditSalaryWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Salary"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="EditSalaryWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,32 @@
|
|||||||
|
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.Salary
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для EditSalaryWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditSalaryWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly ISalaryLogic _salaryLogic;
|
||||||
|
|
||||||
|
public EditSalaryWindow(ISalaryLogic salaryLogic)
|
||||||
|
{
|
||||||
|
_salaryLogic = salaryLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -21,27 +21,31 @@
|
|||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Background="#004890" Foreground="#FFFFFF"
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
Style="{StaticResource RoundedButtonStyle}"/>
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
|
Click="OpenDeleteSalaryWindow"/>
|
||||||
|
|
||||||
<!-- Кнопка "Добавление зарплаты" -->
|
<!-- Кнопка "Добавление зарплаты" -->
|
||||||
<Button Content="Добавление зарплаты"
|
<Button Content="Добавление зарплаты"
|
||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Style="{StaticResource RoundedButtonStyle}"
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
Background="#004890" Foreground="#FFFFFF"/>
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
|
Click="OpenAddSalaryWindow"/>
|
||||||
|
|
||||||
<!-- Кнопка "Редактирование зарплаты" -->
|
<!-- Кнопка "Редактирование зарплаты" -->
|
||||||
<Button Content="Редактирование зарплаты"
|
<Button Content="Редактирование зарплаты"
|
||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Style="{StaticResource RoundedButtonStyle}"
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
Background="#004890" Foreground="#FFFFFF"/>
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
|
Click="OpenEditSalaryWindow"/>
|
||||||
|
|
||||||
<!-- Кнопка "Просмотр зарплат" -->
|
<!-- Кнопка "Просмотр зарплат" -->
|
||||||
<Button Content="Просмотр зарплат"
|
<Button Content="Просмотр зарплат"
|
||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Style="{StaticResource RoundedButtonStyle}"
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
Background="#004890" Foreground="#FFFFFF"/>
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
|
Click="OpenViewSalaryWindow"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
using EmployeeManagmentContracts.BusinessLogicContracts;
|
using EmployeeManagmentBusinessLogic.BusinessLogic;
|
||||||
|
using EmployeeManagmentContracts.BusinessLogicContracts;
|
||||||
using EmployeeManagmentContracts.ViewModels;
|
using EmployeeManagmentContracts.ViewModels;
|
||||||
|
using EmployeeManagmentView.Employee.Vacation;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -32,5 +34,65 @@ namespace EmployeeManagmentView.Employee.Salary
|
|||||||
InitializeComponent();
|
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);
|
||||||
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
EmployeeManagmentView/Employee/Salary/ViewSalaryWindow.xaml
Normal file
12
EmployeeManagmentView/Employee/Salary/ViewSalaryWindow.xaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Salary.ViewSalaryWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Salary"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="ViewSalaryWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,32 @@
|
|||||||
|
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.Salary
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для ViewSalaryWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ViewSalaryWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly ISalaryLogic _salaryLogic;
|
||||||
|
|
||||||
|
public ViewSalaryWindow(ISalaryLogic salaryLogic)
|
||||||
|
{
|
||||||
|
_salaryLogic = salaryLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Vacation.AddVacationWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Vacation"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="AddVacationWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для AddVacationWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AddVacationWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IVacationLogic _vacationLogic;
|
||||||
|
|
||||||
|
public AddVacationWindow(IVacationLogic vacationLogic)
|
||||||
|
{
|
||||||
|
_vacationLogic = vacationLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Vacation.DeleteVacationWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Vacation"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="DeleteVacationWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для DeleteVacationWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class DeleteVacationWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IVacationLogic _vacationLogic;
|
||||||
|
|
||||||
|
public DeleteVacationWindow(IVacationLogic vacationLogic)
|
||||||
|
{
|
||||||
|
_vacationLogic = vacationLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Vacation.EditVacationWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Vacation"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="EditVacationWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для EditVacationWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class EditVacationWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IVacationLogic _vacationLogic;
|
||||||
|
|
||||||
|
public EditVacationWindow(IVacationLogic vacationLogic)
|
||||||
|
{
|
||||||
|
_vacationLogic = vacationLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -21,27 +21,31 @@
|
|||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Background="#004890" Foreground="#FFFFFF"
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
Style="{StaticResource RoundedButtonStyle}"/>
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
|
Click="OpenDeleteVacationWindow"/>
|
||||||
|
|
||||||
<!-- Кнопка "Добавление отпуска" -->
|
<!-- Кнопка "Добавление отпуска" -->
|
||||||
<Button Content="Добавление отпуска"
|
<Button Content="Добавление отпуска"
|
||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Style="{StaticResource RoundedButtonStyle}"
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
Background="#004890" Foreground="#FFFFFF"/>
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
|
Click="OpenAddVacationWindow"/>
|
||||||
|
|
||||||
<!-- Кнопка "Редактирование отпуска" -->
|
<!-- Кнопка "Редактирование отпуска" -->
|
||||||
<Button Content="Редактирование отпуска"
|
<Button Content="Редактирование отпуска"
|
||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Style="{StaticResource RoundedButtonStyle}"
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
Background="#004890" Foreground="#FFFFFF"/>
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
|
Click="OpenEditVacationWindow"/>
|
||||||
|
|
||||||
<!-- Кнопка "Просмотр отпусков" -->
|
<!-- Кнопка "Просмотр отпусков" -->
|
||||||
<Button Content="Просмотр отпусков"
|
<Button Content="Просмотр отпусков"
|
||||||
Width="250" Height="40"
|
Width="250" Height="40"
|
||||||
Style="{StaticResource RoundedButtonStyle}"
|
Style="{StaticResource RoundedButtonStyle}"
|
||||||
Background="#004890" Foreground="#FFFFFF"/>
|
Background="#004890" Foreground="#FFFFFF"
|
||||||
|
Click="OpenViewVacationWindow"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -32,5 +32,65 @@ namespace EmployeeManagmentView.Employee.Vacation
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OpenAddVacationWindow(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Window window in Application.Current.Windows)
|
||||||
|
{
|
||||||
|
if (window is AddVacationWindow existingWindow)
|
||||||
|
{
|
||||||
|
existingWindow.Activate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var addWindow = new AddVacationWindow(_vacationLogic);
|
||||||
|
addWindow.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenDeleteVacationWindow(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Window window in Application.Current.Windows)
|
||||||
|
{
|
||||||
|
if (window is DeleteVacationWindow existingWindow)
|
||||||
|
{
|
||||||
|
existingWindow.Activate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var deleteWindow = new DeleteVacationWindow(_vacationLogic);
|
||||||
|
deleteWindow.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenEditVacationWindow(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Window window in Application.Current.Windows)
|
||||||
|
{
|
||||||
|
if (window is EditVacationWindow existingWindow)
|
||||||
|
{
|
||||||
|
existingWindow.Activate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var editWindow = new EditVacationWindow(_vacationLogic);
|
||||||
|
editWindow.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OpenViewVacationWindow(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
foreach (Window window in Application.Current.Windows)
|
||||||
|
{
|
||||||
|
if (window is ViewVacationWindow existingWindow)
|
||||||
|
{
|
||||||
|
existingWindow.Activate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var viewWindow = new ViewVacationWindow(_vacationLogic);
|
||||||
|
viewWindow.Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
<Window x:Class="EmployeeManagmentView.Employee.Vacation.ViewVacationWindow"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:local="clr-namespace:EmployeeManagmentView.Employee.Vacation"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="ViewVacationWindow" Height="450" Width="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
@ -0,0 +1,32 @@
|
|||||||
|
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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Логика взаимодействия для ViewVacationWindow.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ViewVacationWindow : Window
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IVacationLogic _vacationLogic;
|
||||||
|
|
||||||
|
public ViewVacationWindow(IVacationLogic vacationLogic)
|
||||||
|
{
|
||||||
|
_vacationLogic = vacationLogic;
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user