PIbd-42_Kashin_M.I_CPO_Cour.../Views/MainView.xaml
maksim e768af07da Добавление папк для паттерна MVVM.
Иницилиазация и элементарый вывод работника. (Без БД)
2024-11-11 16:11:20 +04:00

23 lines
1.2 KiB
XML

<Window x:Class="EmployeeManagementApp.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:EmployeeManagementApp.ViewModels"
Title="Управление Сотрудниками" Height="400" Width="600">
<Window.DataContext>
<vm:MainViewModel />
</Window.DataContext>
<Grid>
<DataGrid ItemsSource="{Binding Employees}" AutoGenerateColumns="False" Margin="10">
<DataGrid.Columns>
<DataGridTextColumn Header="ID" Binding="{Binding Id}" Width="50" />
<DataGridTextColumn Header="Имя" Binding="{Binding FirstName}" Width="150" />
<DataGridTextColumn Header="Фамилия" Binding="{Binding LastName}" Width="150" />
<DataGridTextColumn Header="Должность" Binding="{Binding Position}" Width="150" />
<DataGridTextColumn Header="Зарплата" Binding="{Binding Salary}" Width="100" />
<DataGridTextColumn Header="Дни отпуска" Binding="{Binding VacationDays}" Width="100" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</Window>