Page_Servicee.xaml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <Page x:Class="MedicalCenter.Pages.Page_Servicee"
  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:zxing="clr-namespace:ZXing;assembly=zxing"
  7. xmlns:local="clr-namespace:MedicalCenter.Pages"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800"
  10. Title="Servicee"
  11. Style="{StaticResource WinAll}">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="0.2*" MaxHeight="0.8in"/>
  15. <RowDefinition/>
  16. <RowDefinition Height="0.2*" MaxHeight="0.8in"/>
  17. </Grid.RowDefinitions>
  18. <Button Name="btnBackService" Content="На главную" HorizontalAlignment="Left" Margin="10" Padding="10 0" Click="btnBack_Click"/>
  19. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  20. <Button Name="btnDeleteService" Content="Удалить" Margin="10" Padding="5" Click="bntDeleteService_Click" />
  21. <Button Name="btnAddeditService" Content="Добавить" Margin="10" Padding="5" Click="btn_AddEditService_Click" />
  22. </StackPanel>
  23. <TextBox x:Name="search" Text="Поиск" Style="{DynamicResource TextBoxStyle2}" Margin="2in 0.1in" Padding="10 0" GotFocus="search_GotFocus" LostFocus="search_GotFocus" TextChanged="TBoxSearch_TextChanged"/>
  24. <DataGrid x:Name="DataGridService" Grid.Row="1" AutoGenerateColumns="False" HorizontalGridLinesBrush="#045C70" VerticalGridLinesBrush="#045C70" IsReadOnly="True" Style="{DynamicResource DataGridStyle1}">
  25. <FrameworkElement.Resources>
  26. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightGray"/>
  27. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#045C70"/>
  28. <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="BLue"/>
  29. </FrameworkElement.Resources>
  30. <DataGrid.RowStyle>
  31. <Style TargetType="DataGridRow">
  32. <EventSetter Event="MouseDoubleClick" Handler="Grid_MouseLeftButtonDown"/>
  33. </Style>
  34. </DataGrid.RowStyle>
  35. <DataGrid.Columns>
  36. <DataGridTemplateColumn Header="Штрих-код">
  37. <DataGridTemplateColumn.CellTemplate>
  38. <DataTemplate>
  39. <Image Source="{Binding image}" Height="100" Width="200"/>
  40. </DataTemplate>
  41. </DataGridTemplateColumn.CellTemplate>
  42. <DataGridTemplateColumn.HeaderStyle>
  43. <Style TargetType="DataGridColumnHeader">
  44. <Setter Property="Background" Value="#0D0D0D"/>
  45. <Setter Property="BorderBrush" Value="White"/>
  46. <Setter Property="BorderThickness" Value="2"/>
  47. <Setter Property="Foreground" Value="Black"/>
  48. <Setter Property="Template">
  49. <Setter.Value>
  50. <ControlTemplate TargetType="DataGridColumnHeader">
  51. <Border x:Name="border"
  52. BorderBrush="#FF498C51"
  53. BorderThickness="2"
  54. Background="White"
  55. CornerRadius="5 0 0 0" Padding="5,0,5,5">
  56. <ContentPresenter HorizontalAlignment="Center"/>
  57. </Border>
  58. </ControlTemplate>
  59. </Setter.Value>
  60. </Setter>
  61. </Style>
  62. </DataGridTemplateColumn.HeaderStyle>
  63. </DataGridTemplateColumn>
  64. <DataGridTextColumn Header="Номер услуги" Binding="{Binding kod_service}" Width="*">
  65. <DataGridTextColumn.HeaderStyle>
  66. <Style TargetType="DataGridColumnHeader">
  67. <Setter Property="Foreground" Value="Black"/>
  68. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  69. <Setter Property="Template">
  70. <Setter.Value>
  71. <ControlTemplate TargetType="DataGridColumnHeader">
  72. <Border x:Name="border"
  73. BorderBrush="#045C70"
  74. BorderThickness="0 2 2 2"
  75. Background="White" Padding="5,0,5,5">
  76. <ContentPresenter HorizontalAlignment="Center"/>
  77. </Border>
  78. </ControlTemplate>
  79. </Setter.Value>
  80. </Setter>
  81. </Style>
  82. </DataGridTextColumn.HeaderStyle>
  83. </DataGridTextColumn>
  84. <DataGridTextColumn Header="Услуга" Binding="{Binding service1}" Width="*">
  85. <DataGridTextColumn.HeaderStyle>
  86. <Style TargetType="DataGridColumnHeader">
  87. <Setter Property="Background" Value="#0D0D0D"/>
  88. <Setter Property="BorderBrush" Value="White"/>
  89. <Setter Property="BorderThickness" Value="2"/>
  90. <Setter Property="Foreground" Value="Black"/>
  91. <Setter Property="Template">
  92. <Setter.Value>
  93. <ControlTemplate TargetType="DataGridColumnHeader">
  94. <Border x:Name="border"
  95. BorderBrush="#FF498C51"
  96. BorderThickness="0 2 2 2"
  97. Background="White">
  98. <ContentPresenter HorizontalAlignment="Center"/>
  99. </Border>
  100. </ControlTemplate>
  101. </Setter.Value>
  102. </Setter>
  103. </Style>
  104. </DataGridTextColumn.HeaderStyle>
  105. </DataGridTextColumn>
  106. <DataGridTextColumn Header="Цена" Binding="{Binding price}" Width="*">
  107. <DataGridTextColumn.HeaderStyle>
  108. <Style TargetType="DataGridColumnHeader">
  109. <Setter Property="Background" Value="#0D0D0D"/>
  110. <Setter Property="BorderBrush" Value="White"/>
  111. <Setter Property="Foreground" Value="Black"/>
  112. <Setter Property="Template">
  113. <Setter.Value>
  114. <ControlTemplate TargetType="DataGridColumnHeader">
  115. <Border x:Name="border"
  116. BorderBrush="#045C70"
  117. BorderThickness="0 2 2 2"
  118. Background="White">
  119. <ContentPresenter HorizontalAlignment="Center"/>
  120. </Border>
  121. </ControlTemplate>
  122. </Setter.Value>
  123. </Setter>
  124. </Style>
  125. </DataGridTextColumn.HeaderStyle>
  126. </DataGridTextColumn>
  127. </DataGrid.Columns>
  128. </DataGrid>
  129. <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
  130. <Button Content="Назад" Width="1in" MaxWidth="2in" Margin="0 0.1in 0.1in 0.1in" Click="PreviousPageButton_Click"/>
  131. <Button Content="Вперед" Width="1in" MaxWidth="2in" Margin="0 0.1in" Click="NextPageButton_Click"/>
  132. </StackPanel>
  133. </Grid>
  134. </Page>