Page_Historyy.xaml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <Page x:Class="MedicallCenter.Pages.Page_Historyy"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:MedicallCenter.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="Page_Historyy"
  10. Style="{StaticResource WinAll}">
  11. <Grid>
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="0.2*" MaxHeight="0.8in"/>
  14. <RowDefinition/>
  15. <RowDefinition Height="0.2*" MaxHeight="0.8in"/>
  16. </Grid.RowDefinitions>
  17. <Button Content="На главную" HorizontalAlignment="Left" Margin="10" Padding="10 0" Click="btnBack_Click"/>
  18. <TextBox x:Name="search" Text="Поиск" Style="{DynamicResource TextBoxStyle2}" Margin="2in 0.1in" Padding="10 0" GotFocus="search_GotFocus" LostFocus="search_GotFocus" TextChanged="TBoxSearch_TextChanged"/>
  19. <DataGrid x:Name="DataGridHistory" Grid.Row="1" AutoGenerateColumns="False" HorizontalGridLinesBrush="#045C70" VerticalGridLinesBrush="#045C70" IsReadOnly="True" Style="{DynamicResource DataGridStyle1}">
  20. <FrameworkElement.Resources>
  21. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightGray"/>
  22. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#FF498C51"/>
  23. <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="BLue"/>
  24. </FrameworkElement.Resources>
  25. <DataGrid.Columns>
  26. <DataGridTextColumn Header="Номер входа" Binding="{Binding id}" Width="*">
  27. <DataGridTextColumn.HeaderStyle>
  28. <Style TargetType="DataGridColumnHeader">
  29. <Setter Property="Background" Value="#0D0D0D"/>
  30. <Setter Property="BorderBrush" Value="White"/>
  31. <Setter Property="BorderThickness" Value="2"/>
  32. <Setter Property="Foreground" Value="Black"/>
  33. <Setter Property="Template">
  34. <Setter.Value>
  35. <ControlTemplate TargetType="DataGridColumnHeader">
  36. <Border x:Name="border"
  37. BorderBrush="#FF498C51"
  38. BorderThickness="0 2 2 2"
  39. Background="White">
  40. <ContentPresenter HorizontalAlignment="Center"/>
  41. </Border>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. </Style>
  46. </DataGridTextColumn.HeaderStyle>
  47. </DataGridTextColumn>
  48. <DataGridTextColumn Header="Дата входа" Binding="{Binding data}" Width="*">
  49. <DataGridTextColumn.HeaderStyle>
  50. <Style TargetType="DataGridColumnHeader">
  51. <Setter Property="Background" Value="#0D0D0D"/>
  52. <Setter Property="BorderBrush" Value="White"/>
  53. <Setter Property="BorderThickness" Value="2"/>
  54. <Setter Property="Foreground" Value="Black"/>
  55. <Setter Property="Template">
  56. <Setter.Value>
  57. <ControlTemplate TargetType="DataGridColumnHeader">
  58. <Border x:Name="border"
  59. BorderBrush="#FF498C51"
  60. BorderThickness="0 2 2 2"
  61. Background="White">
  62. <ContentPresenter HorizontalAlignment="Center"/>
  63. </Border>
  64. </ControlTemplate>
  65. </Setter.Value>
  66. </Setter>
  67. </Style>
  68. </DataGridTextColumn.HeaderStyle>
  69. </DataGridTextColumn>
  70. <DataGridTextColumn Header="Как зовут" Binding="{Binding name}" Width="*">
  71. <DataGridTextColumn.HeaderStyle>
  72. <Style TargetType="DataGridColumnHeader">
  73. <Setter Property="Background" Value="#0D0D0D"/>
  74. <Setter Property="BorderBrush" Value="White"/>
  75. <Setter Property="BorderThickness" Value="2"/>
  76. <Setter Property="Foreground" Value="Black"/>
  77. <Setter Property="Template">
  78. <Setter.Value>
  79. <ControlTemplate TargetType="DataGridColumnHeader">
  80. <Border x:Name="border"
  81. BorderBrush="#FF498C51"
  82. BorderThickness="0 2 2 2"
  83. Background="White">
  84. <ContentPresenter HorizontalAlignment="Center"/>
  85. </Border>
  86. </ControlTemplate>
  87. </Setter.Value>
  88. </Setter>
  89. </Style>
  90. </DataGridTextColumn.HeaderStyle>
  91. </DataGridTextColumn>
  92. <DataGridTextColumn Header="Логин" Binding="{Binding login}" Width="*">
  93. <DataGridTextColumn.HeaderStyle>
  94. <Style TargetType="DataGridColumnHeader">
  95. <Setter Property="Background" Value="#0D0D0D"/>
  96. <Setter Property="BorderBrush" Value="White"/>
  97. <Setter Property="BorderThickness" Value="2"/>
  98. <Setter Property="Foreground" Value="Black"/>
  99. <Setter Property="Template">
  100. <Setter.Value>
  101. <ControlTemplate TargetType="DataGridColumnHeader">
  102. <Border x:Name="border"
  103. BorderBrush="#FF498C51"
  104. BorderThickness="0 2 2 2"
  105. Background="White">
  106. <ContentPresenter HorizontalAlignment="Center"/>
  107. </Border>
  108. </ControlTemplate>
  109. </Setter.Value>
  110. </Setter>
  111. </Style>
  112. </DataGridTextColumn.HeaderStyle>
  113. </DataGridTextColumn>
  114. <DataGridTextColumn Header="Роль" Binding="{Binding Type.role}" Width="*">
  115. <DataGridTextColumn.HeaderStyle>
  116. <Style TargetType="DataGridColumnHeader">
  117. <Setter Property="Background" Value="#0D0D0D"/>
  118. <Setter Property="BorderBrush" Value="White"/>
  119. <Setter Property="BorderThickness" Value="2"/>
  120. <Setter Property="Foreground" Value="Black"/>
  121. <Setter Property="Template">
  122. <Setter.Value>
  123. <ControlTemplate TargetType="DataGridColumnHeader">
  124. <Border x:Name="border"
  125. BorderBrush="#045C70"
  126. BorderThickness="0 2 2 2"
  127. Background="White">
  128. <ContentPresenter HorizontalAlignment="Center"/>
  129. </Border>
  130. </ControlTemplate>
  131. </Setter.Value>
  132. </Setter>
  133. </Style>
  134. </DataGridTextColumn.HeaderStyle>
  135. </DataGridTextColumn>
  136. <DataGridTextColumn Header="Блокировка" Binding="{Binding block}" Width="*">
  137. <DataGridTextColumn.HeaderStyle>
  138. <Style TargetType="DataGridColumnHeader">
  139. <Setter Property="Background" Value="#0D0D0D"/>
  140. <Setter Property="BorderBrush" Value="White"/>
  141. <Setter Property="Foreground" Value="Black"/>
  142. <Setter Property="Template">
  143. <Setter.Value>
  144. <ControlTemplate TargetType="DataGridColumnHeader">
  145. <Border x:Name="border"
  146. BorderBrush="#045C70"
  147. BorderThickness="0 2 2 2"
  148. Background="White">
  149. <ContentPresenter HorizontalAlignment="Center"/>
  150. </Border>
  151. </ControlTemplate>
  152. </Setter.Value>
  153. </Setter>
  154. </Style>
  155. </DataGridTextColumn.HeaderStyle>
  156. </DataGridTextColumn>
  157. </DataGrid.Columns>
  158. </DataGrid>
  159. <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
  160. <Button Content="Назад" Width="1in" MaxWidth="2in" Margin="0 0.1in 0.1in 0.1in" Click="PreviousPageButton_Click"/>
  161. <Button Content="Вперед" Width="1in" MaxWidth="2in" Margin="0 0.1in" Click="NextPageButton_Click"/>
  162. </StackPanel>
  163. </Grid>
  164. </Page>