PageOrderView.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <Page x:Class="WriteErase.ClassPages.PageOrderView"
  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:WriteErase.ClassPages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="PageOrderView"
  10. FontFamily="Comic Sans MS">
  11. <Grid Margin="15 10">
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="Auto"/>
  14. <RowDefinition Height="Auto"/>
  15. <RowDefinition Height="*"/>
  16. <RowDefinition Height="Auto"/>
  17. </Grid.RowDefinitions>
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="Auto"/>
  20. <ColumnDefinition Width="*"/>
  21. <ColumnDefinition Width="Auto"/>
  22. </Grid.ColumnDefinitions>
  23. <Button Name="btnBack"
  24. Content="Назад"
  25. Click="btnBackClick"
  26. Grid.Column="0"/>
  27. <WrapPanel Grid.Row="1" Grid.ColumnSpan="4" HorizontalAlignment="Center" Margin="0 0 0 5">
  28. <StackPanel Orientation="Horizontal">
  29. <TextBlock
  30. Text="Сортировать по стоимости:"
  31. FontSize="16" Foreground="#498C51"
  32. Margin="10 0"/>
  33. <ComboBox Name="cbCost" SelectedIndex="0" SelectionChanged="cbCostSelectionChanged">
  34. <ComboBoxItem Content="Без сортировки"></ComboBoxItem>
  35. <ComboBoxItem Content="По возрастанию"></ComboBoxItem>
  36. <ComboBoxItem Content="По убыванию"></ComboBoxItem>
  37. </ComboBox>
  38. </StackPanel>
  39. <StackPanel Orientation="Horizontal">
  40. <TextBlock
  41. Text="Фильтровать по скидке"
  42. FontSize="16" Foreground="#498C51"
  43. Margin="10 0"/>
  44. <ComboBox Name="cbDiscount" SelectedIndex="0" SelectionChanged="cbDiscountSelectionChanged">
  45. <ComboBoxItem Content="Все диапазоны"></ComboBoxItem>
  46. <ComboBoxItem Content="0-9.99%"></ComboBoxItem>
  47. <ComboBoxItem Content="10-14.99"></ComboBoxItem>
  48. <ComboBoxItem Content="15% и более"></ComboBoxItem>
  49. </ComboBox>
  50. </StackPanel>
  51. </WrapPanel>
  52. <ListView Name="lvOrder" Grid.Row="2" Grid.ColumnSpan="5"
  53. HorizontalContentAlignment="Stretch"
  54. Focusable="False"
  55. ScrollViewer.HorizontalScrollBarVisibility="Hidden">
  56. <ListView.ItemTemplate>
  57. <DataTemplate>
  58. <Border Padding="5 10"
  59. Margin="0 0 30 0"
  60. CornerRadius="15"
  61. BorderBrush="{Binding colorBorder}" BorderThickness="2">
  62. <Grid HorizontalAlignment="Stretch">
  63. <Grid.ColumnDefinitions>
  64. <ColumnDefinition Width="Auto"/>
  65. <ColumnDefinition Width="Auto"/>
  66. <ColumnDefinition Width="*"/>
  67. <ColumnDefinition Width="Auto"/>
  68. <ColumnDefinition Width="Auto"/>
  69. </Grid.ColumnDefinitions>
  70. <Grid.RowDefinitions>
  71. <RowDefinition Height="Auto"/>
  72. <RowDefinition Height="*"/>
  73. <RowDefinition Height="Auto"/>
  74. <RowDefinition Height="Auto"/>
  75. </Grid.RowDefinitions>
  76. <TextBlock Text="{Binding OrderID, StringFormat='Номер заказа: {0}'}"
  77. Margin="0 0 15 0"
  78. Grid.Row="0" Grid.Column="0"
  79. FontSize="16" Foreground="#498C51"/>
  80. <StackPanel Grid.Row="0" Grid.Column="1" Margin="5 0 15 0">
  81. <TextBlock Text="{Binding OrderDate, StringFormat='Дата заказа: {0:dd MMMM yyyy}'}" Language="ru-RU" Foreground="#498C51"/>
  82. <StackPanel Orientation="Horizontal">
  83. <TextBlock Text="Дата получения " Foreground="#498C51"/>
  84. <DatePicker SelectedDate="{Binding SelectDate}" Margin="5 0" Foreground="#498C51"/>
  85. </StackPanel>
  86. </StackPanel>
  87. <StackPanel Grid.Column="3" Orientation="Horizontal" Margin="15 0">
  88. <TextBlock Text="Статус заказа: "
  89. FontSize="16" Foreground="#498C51"/>
  90. <ComboBox
  91. ItemsSource="{Binding StatusList}"
  92. SelectedIndex="{Binding Status}"/>
  93. </StackPanel>
  94. <TextBlock
  95. Text="{Binding OrderClienr}"
  96. Grid.Row="0" Grid.Column="4"
  97. FontSize="16" Foreground="#498C51"/>
  98. <ListView ItemsSource="{Binding OrderProduct}"
  99. HorizontalContentAlignment="Stretch"
  100. Grid.Row="1" Grid.ColumnSpan="5"
  101. BorderThickness="0"
  102. Focusable="False">
  103. <ListView.ItemTemplate>
  104. <DataTemplate>
  105. <Border BorderThickness="0,0,0,1" BorderBrush="#498C51" Margin="10 0">
  106. <Grid>
  107. <Grid.ColumnDefinitions>
  108. <ColumnDefinition Width="Auto"></ColumnDefinition>
  109. <ColumnDefinition Width="*"></ColumnDefinition>
  110. <ColumnDefinition Width="Auto"></ColumnDefinition>
  111. </Grid.ColumnDefinitions>
  112. <Grid.RowDefinitions>
  113. <RowDefinition Height="*"></RowDefinition>
  114. <RowDefinition Height="Auto"></RowDefinition>
  115. </Grid.RowDefinitions>
  116. <Image Name="image" Grid.Column="0"
  117. Source="{Binding Product.img}" Stretch="Uniform"
  118. Margin="5" Width="100" Height="100" MaxWidth="100" MaxHeight="100"/>
  119. <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5">
  120. <TextBlock Text="{Binding Product.ProductName}" Foreground="#498C51"/>
  121. <TextBlock Text="{Binding Product.ProductDescription}" TextWrapping="Wrap" Foreground="#498C51"/>
  122. <TextBlock Text="{Binding Product.ProductManufacturer.ManufacturerName, StringFormat='Производитель: {0}'}" Foreground="#498C51"/>
  123. <TextBlock Text="{Binding Product.Cost, StringFormat='Цена за шт: {0:C2}'}" Language="ru-RU" Foreground="#498C51"/>
  124. </StackPanel>
  125. <TextBlock Text="{Binding CountProduct}" Grid.Row="1" Foreground="#498C51"/>
  126. </Grid>
  127. </Border>
  128. </DataTemplate>
  129. </ListView.ItemTemplate>
  130. <ListView.ItemContainerStyle>
  131. <Style TargetType="ListViewItem">
  132. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  133. </Style>
  134. </ListView.ItemContainerStyle>
  135. </ListView>
  136. <Grid Grid.Row="2" Grid.ColumnSpan="4"
  137. HorizontalAlignment="Stretch">
  138. <Grid.ColumnDefinitions>
  139. <ColumnDefinition Width="Auto"/>
  140. <ColumnDefinition Width="Auto"/>
  141. <ColumnDefinition Width="*"/>
  142. <ColumnDefinition Width="*"/>
  143. </Grid.ColumnDefinitions>
  144. <TextBlock Text="Сумма заказа: "
  145. HorizontalAlignment="Right"
  146. VerticalAlignment="Center"
  147. Grid.Column="0"
  148. Foreground="#498C51"
  149. Margin="15 0 5 0"/>
  150. <StackPanel Orientation="Vertical"
  151. Grid.Column="1">
  152. <TextBlock Text="{Binding CostWithoutDiscount, StringFormat=' {0:C2}'}" Language="ru-RU" Foreground="#498C51"/>
  153. <TextBlock Text="{Binding CostWithDiscount, StringFormat=' {0:C2}'}"
  154. Language="ru-RU"
  155. Visibility="{Binding VisibilityCost}"
  156. TextDecorations="Strikethrough"
  157. Foreground="#498C51"/>
  158. </StackPanel>
  159. <TextBlock Text="{Binding ProcentCost, StringFormat='Скидка: {0}%'}"
  160. HorizontalAlignment="Left"
  161. VerticalAlignment="Center"
  162. Grid.Column="2"
  163. Margin="5 0"
  164. Foreground="#498C51"/>
  165. <TextBlock
  166. Text="{Binding OrderCode, StringFormat='Код получения: {0}'}"
  167. HorizontalAlignment="Right"
  168. VerticalAlignment="Bottom"
  169. Grid.Column="3"
  170. FontSize="16" Foreground="#498C51"/>
  171. </Grid>
  172. </Grid>
  173. </Border>
  174. </DataTemplate>
  175. </ListView.ItemTemplate>
  176. </ListView>
  177. </Grid>
  178. </Page>