ServiceList.xaml 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <Page x:Class="LearnSchool.ServiceList"
  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:LearnSchool"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="ServiceList">
  10. <Grid Background="White">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="*"/>
  13. <RowDefinition Height="12*"/>
  14. <RowDefinition Height="*"/>
  15. </Grid.RowDefinitions>
  16. <StackPanel Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">
  17. <StackPanel Orientation="Vertical">
  18. <TextBlock FontWeight="Bold" HorizontalAlignment="Center">Сортировка по цене</TextBlock>
  19. <StackPanel Orientation="Horizontal">
  20. <RadioButton Checked="Up_Checked" Margin="0,0,10,0" GroupName="PriceSort" Name="Up">По возрастанию</RadioButton>
  21. <RadioButton Checked="Down_Checked" GroupName="PriceSort" Name="Down">По убыванию</RadioButton>
  22. </StackPanel>
  23. </StackPanel>
  24. <StackPanel VerticalAlignment="Center" Margin="10,0,0,0" Width="150">
  25. <ComboBox Name="PromoFilter" SelectionChanged="PromoChange"/>
  26. </StackPanel>
  27. <TextBox Margin="10,0,0,0" Width="150" Name="Search" TextChanged="SearchChange"/>
  28. </StackPanel>
  29. <StackPanel Width="100" VerticalAlignment="Center" Margin="0,0,10,0" HorizontalAlignment="Right">
  30. <Button Click="Login" Background="#0000">Войти</Button>
  31. </StackPanel>
  32. <ListView Grid.Row="1" Name="ServiceData">
  33. <ListView.ItemsPanel>
  34. <ItemsPanelTemplate>
  35. <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
  36. </ItemsPanelTemplate>
  37. </ListView.ItemsPanel>
  38. <ListView.ItemTemplate>
  39. <DataTemplate>
  40. <Border Width="800" Height="200" BorderThickness="1" BorderBrush="Black" CornerRadius="5">
  41. <Grid Width="795" Height="195" Loaded="BackgroundLoad" Uid="{Binding ID}">
  42. <StackPanel Margin="10,0,0,0" Orientation="Horizontal">
  43. <Border BorderThickness="1" Width="180" Height="180" BorderBrush="Black" CornerRadius="5">
  44. <Image Source="{Binding MainImagePath}" Width="180" Height="180"/>
  45. </Border>
  46. <StackPanel Height="180" Margin="10,0,0,0">
  47. <TextBlock Text="{Binding Title}"/>
  48. <StackPanel Orientation="Horizontal">
  49. <TextBlock Uid="{Binding ID}" Text="{Binding StringFormat={}{0:#}, Path=Cost}" TextDecorations="Strikethrough" Loaded="Strike" Margin="0,0,5,0"/>
  50. <TextBlock Uid="{Binding ID}" Text="{Binding StringFormat={}{0:#} рублей, Path=Cost}" Loaded="PriceLoad"/>
  51. <TextBlock Uid="{Binding ID}" Loaded="Minutes"/>
  52. </StackPanel>
  53. <TextBlock Uid="{Binding ID}" Loaded="Promo"/>
  54. <StackPanel Loaded="DelEditLoad" Visibility="Hidden" VerticalAlignment="Bottom" Orientation="Horizontal">
  55. <Border CornerRadius="5" Width="200" Height="25" BorderBrush="Black" BorderThickness="1">
  56. <Button Uid="{Binding ID}" Click="RedServ" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Edit">редактировать</Button>
  57. </Border>
  58. <Border Margin="10,0,0,0" CornerRadius="5" Width="150" Height="25" BorderBrush="Black" BorderThickness="1">
  59. <Button Uid="{Binding ID}" Click="DeleteServ" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Delete">удалить</Button>
  60. </Border>
  61. <Border Margin="10,0,0,0" CornerRadius="5" Width="150" Height="25" BorderBrush="Black" BorderThickness="1">
  62. <Button Uid="{Binding ID}" Click="MakeReg" BorderBrush="#0000" VerticalContentAlignment="Center" Background="#0000" Name="Reg">записаться</Button>
  63. </Border>
  64. </StackPanel>
  65. </StackPanel>
  66. </StackPanel>
  67. </Grid>
  68. </Border>
  69. </DataTemplate>
  70. </ListView.ItemTemplate>
  71. </ListView>
  72. <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center">
  73. <TextBlock Name="global"></TextBlock>
  74. <Button Visibility="Collapsed" Margin="10,0,0,0" HorizontalAlignment="Center" Loaded="AddS" Click="Add">Добавить услугу</Button>
  75. <Button Visibility="Collapsed" Margin="10,0,0,0" HorizontalAlignment="Center" Loaded="ViewR" Click="ViewReg" >Просмотр ближайших записей</Button>
  76. </StackPanel>
  77. </Grid>
  78. </Page>