123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <Window x:Class="Practics.AdminTicketWindow"
- 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:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- xmlns:local="clr-namespace:Practics"
- mc:Ignorable="d"
- Title="Администратор" Height="450" Width="850" Loaded="Window_Loaded">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="100"/>
- <RowDefinition/>
- <RowDefinition Height="40"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="160"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="150"/>
- </Grid.ColumnDefinitions>
- <UniformGrid Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Columns="2" Rows="4">
- <TextBlock Text="Начало периода"/>
- <xctk:DateTimePicker x:Name="dtpStartPeriod"/>
- <TextBlock Text="Окончание периода"/>
- <xctk:DateTimePicker x:Name="dtpFinishPeriod"/>
- <TextBlock>Статус</TextBlock>
- <ComboBox x:Name="cbProblemStatus" Text="Все"></ComboBox>
- <TextBlock>Тип заявки</TextBlock>
- <ComboBox x:Name="cbProblemType" Text="Все"></ComboBox>
- </UniformGrid>
- <Button x:Name="btnReport" Grid.Column="2" Grid.Row="4" Margin="2" Click="btnReport_Click">Отчет</Button>
- <Button x:Name="btnFilter" Grid.Column="1" Grid.Row="2" Margin="2" Width="100" Click="btnFilter_Click">Фильтр</Button>
- <DataGrid Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" x:Name="dgTickets" AutoGenerateColumns="False" SelectionChanged="dgTickets_SelectionChanged" SelectionUnit="FullRow" IsReadOnly="True" CanUserAddRows="False">
- <DataGrid.Columns>
- <!-- Остальные столбцы вашей таблицы -->
- <!--<DataGridTextColumn Header="ID Problem" Binding="{Binding Id}" />-->
- <DataGridTextColumn Header="Фамилия" Binding="{Binding LastName}" />
- <DataGridTextColumn Header="Имя" Binding="{Binding FirstName}" />
- <DataGridTextColumn Header="Отчество" Binding="{Binding MiddleName}" />
- <DataGridTextColumn Header="Краткое описание" Binding="{Binding ProblemName}" />
- <DataGridComboBoxColumn x:Name="dgcbcStatus" SelectedValueBinding="{Binding ProblemStatusID}" Header="Статус" />
- <DataGridComboBoxColumn x:Name="dgcbcProblemType" SelectedValueBinding="{Binding ProblemTypeID}" Header="Тип" />
- <DataGridTemplateColumn Header="Дата заявки">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <!-- Добавляем DatePicker в шаблон столбца -->
- <xctk:DateTimePicker Value="{Binding ProblemTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Обработать">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button x:Name="btnProcessWindow" Click="btnProcessWindow_Click">Обработать</Button>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- <StackPanel Grid.Row="1" Grid.Column="0">
- <Button x:Name="btnUpdateProblems" Click="btnUpdateProblems_Click">Обновить БД</Button>
- <Button x:Name="btnReadProblems" Click="btnReadProblems_Click">Считать данные из БД</Button>
- <Button x:Name="btnShowNotesWindow" Click="btnShowNotesWindow_Click">База знаний</Button>
- <Button x:Name="btnExit" Click="btnExit_Click">Выход</Button>
- </StackPanel>
- </Grid>
- </Window>
|