WindowOrderView.xaml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <Window x:Class="WriteErase.ClassWindows.WindowOrderView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WriteErase.ClassWindows"
  7. mc:Ignorable="d"
  8. Title="Пиши-Стирай | Корзина"
  9. Icon="/Assets/icon.ico"
  10. Height="560" Width="500"
  11. ResizeMode="NoResize"
  12. FontFamily="Comic Sans MS">
  13. <Grid Margin="15 10">
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="Auto"/>
  16. <RowDefinition Height="Auto"/>
  17. <RowDefinition Height="*"/>
  18. <RowDefinition Height="Auto"/>
  19. <RowDefinition Height="Auto"/>
  20. </Grid.RowDefinitions>
  21. <StackPanel Grid.Row="0" Orientation="Horizontal">
  22. <TextBlock Text="Пункт выдачи" Margin="0 0 10 0"
  23. FontSize="16" Foreground="#498C51"/>
  24. <ComboBox Name="cbPoint"
  25. IsTextSearchEnabled="False"
  26. IsEditable="True"
  27. TextBoxBase.TextChanged="cbPointTextChanged"
  28. Width="330"
  29. HorizontalAlignment="Stretch"/>
  30. </StackPanel>
  31. <TextBlock Name="tbkCountProduct"
  32. Text="Количество продуктов"
  33. HorizontalAlignment="Right"
  34. Grid.Row="1"
  35. Foreground="#498C51"
  36. Margin="0 10"/>
  37. <ListView Name="lvProduct" Grid.Row="2"
  38. ItemsSource="{Binding}"
  39. Margin="0 5 0 0"
  40. ScrollViewer.HorizontalScrollBarVisibility="Hidden"
  41. ScrollViewer.VerticalScrollBarVisibility="Auto"
  42. BorderThickness="0"
  43. HorizontalContentAlignment="Stretch">
  44. <ListView.ItemsPanel>
  45. <ItemsPanelTemplate>
  46. <StackPanel></StackPanel>
  47. </ItemsPanelTemplate>
  48. </ListView.ItemsPanel>
  49. <ListView.ItemTemplate>
  50. <DataTemplate>
  51. <Border CornerRadius="15" Margin="0 0 15 0">
  52. <Grid>
  53. <Grid.ColumnDefinitions>
  54. <ColumnDefinition Width="Auto"></ColumnDefinition>
  55. <ColumnDefinition Width="*"></ColumnDefinition>
  56. <ColumnDefinition Width="Auto"></ColumnDefinition>
  57. </Grid.ColumnDefinitions>
  58. <Grid.RowDefinitions>
  59. <RowDefinition Height="*"></RowDefinition>
  60. <RowDefinition Height="Auto"></RowDefinition>
  61. </Grid.RowDefinitions>
  62. <Image Name="image"
  63. Source="{Binding img}"
  64. Margin="5"
  65. Width="100" Height="100"
  66. Stretch="Uniform"
  67. Grid.Column="0" Grid.Row="0"/>
  68. <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="1" Margin="5">
  69. <TextBlock Text="{Binding ProductName}" Foreground="#498C51" FontSize="16" FontWeight="Bold"/>
  70. <TextBlock Text="{Binding ProductDescription}" HorizontalAlignment="Left" Width="265" TextWrapping="Wrap" Foreground="#498C51"/>
  71. <TextBlock Text="{Binding ProductManufacturer.ManufacturerName, StringFormat='Производитель: {0}'}" Foreground="#498C51"/>
  72. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  73. <TextBlock Text="Цена:" Foreground="#498C51"/>
  74. <TextBlock Text="{Binding ProductCost, StringFormat=' {0:C2}'}"
  75. Language="ru-RU"
  76. Visibility="{Binding VisibilityCost}"
  77. TextDecorations="Strikethrough"
  78. Foreground="#498C51"/>
  79. <TextBlock Text="{Binding Cost, StringFormat=' {0:C2}'}" Language="ru-RU" Foreground="#498C51"/>
  80. </StackPanel>
  81. </StackPanel>
  82. <Button
  83. Style="{StaticResource Close}"
  84. Grid.Column="2" Grid.Row="0"
  85. Uid="{Binding ProductArticleNumber}"
  86. Click="ProductDeleteClick"/>
  87. <StackPanel Grid.Row="1" Grid.ColumnSpan="3"
  88. Orientation="Horizontal"
  89. HorizontalAlignment="Right"
  90. Margin="0 10">
  91. <Button Content="-10"
  92. Uid="{Binding ProductArticleNumber}"
  93. Click="ChangeCountClick"
  94. Style="{StaticResource MinWith}"/>
  95. <Button Content="-"
  96. Uid="{Binding ProductArticleNumber}"
  97. Click="ChangeCountClick"
  98. Style="{StaticResource MinWith}"/>
  99. <TextBlock
  100. Text="{Binding CountProduct}"
  101. FontSize="16"
  102. Foreground="#498C51"
  103. Margin="10 0"/>
  104. <Button Content="+"
  105. Uid="{Binding ProductArticleNumber}"
  106. Click="ChangeCountClick"
  107. Style="{StaticResource MinWith}"/>
  108. <Button Content="+10"
  109. Uid="{Binding ProductArticleNumber}"
  110. Click="ChangeCountClick"
  111. Style="{StaticResource MinWith}"/>
  112. </StackPanel>
  113. </Grid>
  114. </Border>
  115. </DataTemplate>
  116. </ListView.ItemTemplate>
  117. </ListView>
  118. <Grid Grid.Row="3" Margin="0 5 0 0">
  119. <Grid.ColumnDefinitions>
  120. <ColumnDefinition Width="*"/>
  121. <ColumnDefinition Width="Auto"/>
  122. <ColumnDefinition Width="Auto"/>
  123. </Grid.ColumnDefinitions>
  124. <Grid Grid.Column="0">
  125. <TextBlock
  126. Text="Сумма покупки: "
  127. VerticalAlignment="Center"
  128. FontWeight="Bold"
  129. FontSize="16" Foreground="#498C51"/>
  130. <StackPanel Orientation="Vertical" HorizontalAlignment="Right">
  131. <TextBlock Name="tbkNowCost"
  132. Text="новая цена"
  133. Language="ru-RU"
  134. HorizontalAlignment="Right"
  135. FontSize="16" Foreground="#498C51"/>
  136. <TextBlock Name="tbkOldCost"
  137. Text="старая цена"
  138. Language="ru-RU"
  139. HorizontalAlignment="Right"
  140. TextDecorations="Strikethrough"
  141. FontSize="16" Foreground="#498C51"/>
  142. </StackPanel>
  143. </Grid>
  144. <TextBlock Name="tbkDiscount"
  145. Text="Процент"
  146. VerticalAlignment="Center"
  147. Grid.Column="1"
  148. Margin="10 0"
  149. FontSize="16" Foreground="#498C51"/>
  150. <Button Name="btnNewOrder"
  151. Content="Оформить заказ"
  152. Click="btnNewOrderClick"
  153. Grid.Column="3"/>
  154. </Grid>
  155. </Grid>
  156. </Window>