PageListOfService.xaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <Page x:Class="School.PageListOfService"
  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:School"
  7. mc:Ignorable="d"
  8. d:MinHeight="500" d:MinWidth="800"
  9. Title="Услуги">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="1*"/>
  13. <RowDefinition Height="1*"/>
  14. <RowDefinition Height="1*"/>
  15. <RowDefinition Height="1*"/>
  16. <RowDefinition Height="300"/>
  17. <RowDefinition Height="1*" />
  18. <RowDefinition Height="1*"/>
  19. </Grid.RowDefinitions>
  20. <Grid Grid.Row="0">
  21. <TextBlock x:Name="Title" Text="Услуги" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{StaticResource HeaderText}"/>
  22. </Grid>
  23. <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="5">
  24. <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center">
  25. <TextBlock>Введите название услуги:</TextBlock>
  26. </StackPanel>
  27. <StackPanel VerticalAlignment="Center" Width="600">
  28. <TextBox Name="SearchName" TextChanged="SearchName_TextChanged"></TextBox>
  29. </StackPanel>
  30. </StackPanel>
  31. <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="5">
  32. <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center">
  33. <TextBlock>Введите описание услуги:</TextBlock>
  34. </StackPanel>
  35. <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Width="600">
  36. <TextBox Name="SearchDescription" TextChanged="SearchDescription_TextChanged"></TextBox>
  37. </StackPanel>
  38. </StackPanel>
  39. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="3" Margin="5">
  40. <StackPanel Orientation="Horizontal">
  41. <StackPanel VerticalAlignment="Center">
  42. <ComboBox Name="Sorting" SelectionChanged="Sorting_SelectionChanged" Width="350">
  43. <ComboBoxItem>По возрастанию</ComboBoxItem>
  44. <ComboBoxItem>По убыванию</ComboBoxItem>
  45. </ComboBox>
  46. </StackPanel>
  47. <StackPanel VerticalAlignment="Center" Width="350">
  48. <ComboBox Name="Filtering" SelectionChanged="Filtering_SelectionChanged">
  49. <ComboBoxItem>Все</ComboBoxItem>
  50. <ComboBoxItem>От 0% До 5%</ComboBoxItem>
  51. <ComboBoxItem>От 5% До 15%</ComboBoxItem>
  52. <ComboBoxItem>От 15% До 30%</ComboBoxItem>
  53. <ComboBoxItem>От 30% До 70%</ComboBoxItem>
  54. <ComboBoxItem>От 70% До 100%</ComboBoxItem>
  55. </ComboBox>
  56. </StackPanel>
  57. </StackPanel>
  58. </StackPanel>
  59. <ListView Grid.Row="4" Name="ListService" Height="200" ScrollViewer.HorizontalScrollBarVisibility="Hidden" HorizontalContentAlignment="Stretch">
  60. <ListView.ItemTemplate>
  61. <DataTemplate>
  62. <Border Style="{StaticResource BorderStyle}">
  63. <Grid Height="150" VerticalAlignment="Center" Background="{Binding TextBrush}" >
  64. <Grid.ColumnDefinitions>
  65. <ColumnDefinition Width="300"/>
  66. <ColumnDefinition/>
  67. </Grid.ColumnDefinitions>
  68. <Grid Grid.Column="0" >
  69. <Image Name="ImageService" Source="{Binding MainImagePath}"></Image>
  70. </Grid>
  71. <Grid Grid.Column="1">
  72. <Grid.RowDefinitions>
  73. <RowDefinition/>
  74. <RowDefinition Height="40"/>
  75. </Grid.RowDefinitions>
  76. <Grid Grid.Row="0">
  77. <StackPanel>
  78. <TextBlock Name="service" Text="{Binding Title}" Style="{StaticResource TextList}"></TextBlock>
  79. <StackPanel Orientation="Horizontal">
  80. <TextBlock Name="Cost" Text="{Binding cost}" TextDecorations="Strikethrough" Style="{StaticResource TextList}"></TextBlock>
  81. <TextBlock Name="Price" Text="{Binding price}" Style="{StaticResource TextList}"></TextBlock>
  82. </StackPanel>
  83. <TextBlock Name="Sale" Text="{Binding sale}" Style="{StaticResource TextList}"></TextBlock>
  84. </StackPanel>
  85. </Grid>
  86. <Grid Grid.Row="1" >
  87. <StackPanel Orientation="Horizontal">
  88. <Button Uid="{Binding ID}" Template="{StaticResource ButtonInElement}" Name="SingUp" Click="SingUp_Click" Visibility="{Binding btn_admin}">Записать</Button>
  89. <Button Uid="{Binding ID}" Template="{StaticResource ButtonInElement}" Name="Delete" Click="Delete_Click" Visibility="{Binding btn_admin}" >Удаление</Button>
  90. <Button Uid="{Binding ID}" Template="{StaticResource ButtonInElement}" Name="Update" Click="Update_Click" Visibility="{Binding btn_admin}">Редактирование</Button>
  91. </StackPanel>
  92. </Grid>
  93. </Grid>
  94. </Grid>
  95. </Border>
  96. </DataTemplate>
  97. </ListView.ItemTemplate>
  98. </ListView>
  99. <Grid Grid.Row="5">
  100. <Grid.ColumnDefinitions>
  101. <ColumnDefinition/>
  102. <ColumnDefinition/>
  103. </Grid.ColumnDefinitions>
  104. <Button Grid.Column="0" Name="Home" Template="{StaticResource Button}" Click="Home_Click">На главную</Button>
  105. <Button Grid.Column="1" Name="AddService" Template="{StaticResource Button}" Visibility="Collapsed" Click="AddService_Click" Width="300">Добавить новую услугу</Button>
  106. </Grid>
  107. <StackPanel Grid.Row="6" VerticalAlignment="Center">
  108. <TextBlock Name="CountService"></TextBlock>
  109. </StackPanel>
  110. </Grid>
  111. </Page>