pageServicesList.xaml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <Page x:Class="school.pageServicesList"
  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:DesignHeight="450" d:DesignWidth="800"
  9. Title="pageServicesList">
  10. <Page.Resources>
  11. <BitmapImage x:Key="_noPhoto" UriSource="/Resource/noPhoto.png"/>
  12. </Page.Resources>
  13. <Grid Margin="7">
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="0.1*" MinHeight="50"></RowDefinition>
  16. <RowDefinition Height="*"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="Auto"></ColumnDefinition>
  20. <ColumnDefinition Width="*"></ColumnDefinition>
  21. </Grid.ColumnDefinitions>
  22. <Grid Grid.Row="0" Margin="7" Grid.Column="0" Grid.ColumnSpan="2">
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition></ColumnDefinition>
  25. <ColumnDefinition Width="0.3*"></ColumnDefinition>
  26. </Grid.ColumnDefinitions>
  27. <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
  28. <Button Name="BtnSort" Click="BtnSortClick" Style="{StaticResource usuallyButtonFill}" Width="150" >Сортировать</Button>
  29. <Button Name="BtnAdd" Click="BtnAddClick" Visibility="Collapsed" Style="{StaticResource usuallyButtonFill}" Width="150" Margin="10 0">Добавить</Button>
  30. <Button Name="BtnRead" Click="BtnReadClick" Visibility="Collapsed" Style="{StaticResource usuallyButtonFill}" Width="150">Ближайшие записи</Button>
  31. </StackPanel>
  32. <Viewbox Grid.Column="1">
  33. <Button Name="BtnAdminAuthorizstion" Click="BtnAdminAuthorizstionClick" Content="Войти" Style="{StaticResource usuallyButton}"/>
  34. </Viewbox>
  35. </Grid>
  36. <Grid Name="GSort" Grid.Row="1" Grid.Column="0" Visibility="Collapsed">
  37. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  38. <Grid Margin="5">
  39. <Grid.RowDefinitions>
  40. <RowDefinition></RowDefinition>
  41. <RowDefinition Height="Auto"></RowDefinition>
  42. </Grid.RowDefinitions>
  43. <StackPanel Grid.Row="0">
  44. <GroupBox Header="Сортировать по стоимости" Style="{StaticResource usuallyGroupBox}">
  45. <StackPanel>
  46. <RadioButton Name="RBSalaryUp" Style="{StaticResource usuallyRadioButton}" Checked="SortChecked">По возрастанию</RadioButton>
  47. <RadioButton Name="RBSalaryDown" Style="{StaticResource usuallyRadioButton}" Checked="SortChecked">По убыванию</RadioButton>
  48. </StackPanel>
  49. </GroupBox>
  50. <GroupBox Header="Сортировать по размеру скидки" Style="{StaticResource usuallyGroupBox}">
  51. <ComboBox Name="CBDiscount" SelectionChanged="CBDiscountSelectionChanged" Style="{StaticResource usuallyComboBox}"></ComboBox>
  52. </GroupBox>
  53. <GroupBox Header="Поиск по названию" Style="{StaticResource usuallyGroupBox}">
  54. <TextBox Name="TBSearchName" TextChanged="TBSearchTextChanged" Tag="Введите.." Style="{StaticResource usuallyTextBloxSearch}"></TextBox>
  55. </GroupBox>
  56. <GroupBox Header="Поиск по описанию" Style="{StaticResource usuallyGroupBox}">
  57. <TextBox Name="TBSearchDiscription" TextChanged="TBSearchTextChanged" Tag="Введите.." Style="{StaticResource usuallyTextBloxSearch}"></TextBox>
  58. </GroupBox>
  59. </StackPanel>
  60. <Grid Grid.Row="1">
  61. <Button Name="BtnNoSort" Click="BtnNoSortClick" Style="{StaticResource usuallyButtonNoFill}" HorizontalAlignment="Left">Сбросить фильтры</Button>
  62. <TextBlock Name="TBCountRecord" Style="{StaticResource usuallyTextBlock}" HorizontalAlignment="Right" VerticalAlignment="Bottom">Количество</TextBlock>
  63. </Grid>
  64. </Grid>
  65. </ScrollViewer>
  66. </Grid>
  67. <Grid Grid.Row="1" Grid.Column="1">
  68. <ListView Name="LVServiseList" BorderBrush="White" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
  69. <ListView.ItemTemplate>
  70. <DataTemplate>
  71. <Border BorderBrush="LightSlateGray" BorderThickness="1" Background="{Binding colorDiscount}" CornerRadius="5">
  72. <Grid>
  73. <Grid.ColumnDefinitions>
  74. <ColumnDefinition Width="120"></ColumnDefinition>
  75. <ColumnDefinition Width="*"></ColumnDefinition>
  76. </Grid.ColumnDefinitions>
  77. <Grid Grid.Column="0" Margin="5">
  78. <Image Name="imgServise" Source="{Binding Path=imgServise, TargetNullValue={StaticResource _noPhoto}}" Stretch="Uniform"/>
  79. </Grid>
  80. <StackPanel Grid.Column="1" Margin="5">
  81. <StackPanel Margin="0 0 0 15">
  82. <TextBlock Name="TBNameService" Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource usuallyTextBlock}"/>
  83. <StackPanel Orientation="Horizontal">
  84. <TextBlock Text="{Binding oldPrice}" TextDecorations="Strikethrough" Visibility="{Binding discountVisible}" Style="{StaticResource usuallyTextBlock}"/>
  85. <TextBlock Name="TBPriceService" Text="{Binding price}" TextWrapping="Wrap" Style="{StaticResource usuallyTextBlock}"/>
  86. </StackPanel>
  87. <TextBlock Name="TBSaleService" Text="{Binding sale}" TextWrapping="Wrap" Style="{StaticResource usuallyTextBlock}"/>
  88. </StackPanel>
  89. <Grid>
  90. <StackPanel Orientation="Horizontal">
  91. <Button Uid="{Binding ID}" Name="BtnEdit" Click="BtnEditClick" Content="Редактировать" Style="{StaticResource usuallyButton}" Margin="10 0" Visibility="{Binding btnAdminVisible}"/>
  92. <Button Uid="{Binding ID}" Name="BtnDelete" Click="BtnDeleteClick" Content="Удалить" Style="{StaticResource usuallyButton}" Margin="10 0" Visibility="{Binding btnAdminVisible}"/>
  93. </StackPanel>
  94. <Button Uid="{Binding ID}" Name="BtnWrite" Click="BtnWriteClick" Content="{Binding nameBtn}" Style="{StaticResource usuallyButton}" Margin="10 0" HorizontalAlignment="Right"/>
  95. </Grid>
  96. </StackPanel>
  97. </Grid>
  98. </Border>
  99. </DataTemplate>
  100. </ListView.ItemTemplate>
  101. </ListView>
  102. <TextBlock Name="TBNoSevise" Style="{StaticResource usuallyTextBlockHeader}" FontSize="30">Нет подходящих услуг</TextBlock>
  103. </Grid>
  104. </Grid>
  105. </Page>