OrderCard.xaml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <Page x:Class="Sessioa.Pages.OrderCard"
  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:Sessioa.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. FontFamily="Comic Sans MS"
  10. FontSize="16"
  11. Title="Корзина с товарами">
  12. <Page.Resources>
  13. <BitmapImage x:Key="defaultImage" UriSource="/Resources/picture.png"/>
  14. </Page.Resources>
  15. <Grid>
  16. <Grid.RowDefinitions>
  17. <RowDefinition/>
  18. <RowDefinition Height="8.5*"/>
  19. <RowDefinition Height="2.5*"/>
  20. <RowDefinition/>
  21. </Grid.RowDefinitions>
  22. <StackPanel Orientation="Horizontal">
  23. <Button Name="B_Back" Content="Назад" Style="{StaticResource ButtonAct}" Margin="10,0" MaxHeight="50" MinWidth="90" MaxWidth="150" Click="B_Back_Click" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  24. <TextBlock x:Name="OrderTitle" Style="{StaticResource TextBlockMain}" VerticalAlignment="Center" Margin="0,0,10,0"/>
  25. <TextBlock x:Name="OrderCode" Style="{StaticResource TextBlockMain}" VerticalAlignment="Center" Loaded="OrderCode_Loaded"/>
  26. </StackPanel>
  27. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="30,0" VerticalAlignment="Center">
  28. <TextBlock Text="Пункт выдачи: " Style="{StaticResource TextBlock}" VerticalAlignment="Center"/>
  29. <ComboBox Name="CB_Punkt" MaxHeight="50" MinWidth="250" Margin="5"/>
  30. <TextBlock Name="TB_Punkt" Style="{StaticResource TextBlock}" VerticalAlignment="Center" Visibility="Collapsed"/>
  31. </StackPanel>
  32. <ListBox Name="LB_ProductsOrder" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="1">
  33. <ListBox.ItemTemplate>
  34. <DataTemplate>
  35. <Grid>
  36. <Grid.ColumnDefinitions>
  37. <ColumnDefinition Width="2*"/>
  38. <ColumnDefinition Width="0.2*"/>
  39. </Grid.ColumnDefinitions>
  40. <Border BorderBrush="#498C51" BorderThickness="3" CornerRadius="5" Margin="10,0,0,0">
  41. <Grid>
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="0.3*"/>
  44. <ColumnDefinition Width="2*"/>
  45. <ColumnDefinition Width="0.2*"/>
  46. </Grid.ColumnDefinitions>
  47. <Image Source="{Binding ProductPhoto, TargetNullValue={StaticResource defaultImage}}" Margin="5" MaxWidth="80"/>
  48. <StackPanel Grid.Column="1">
  49. <TextBlock Text="{Binding ProductName}" Style="{StaticResource TextBlockBold}"/>
  50. <TextBlock Text="{Binding ProductDescription}" Style="{StaticResource TextBlock}"/>
  51. <StackPanel Orientation="Horizontal">
  52. <TextBlock Text="Производитель:" Style="{StaticResource TextBlock}" Margin="0,0,5,0"/>
  53. <TextBlock Text="{Binding Manufacturer.Manufacturer1}" Style="{StaticResource TextBlock}"/>
  54. </StackPanel>
  55. <StackPanel Orientation="Horizontal">
  56. <TextBlock Text="Цена: " Style="{StaticResource TextBlock}" Margin="0,0,5,0"/>
  57. <TextBlock Name="countPr" Text="{Binding ProductCost, StringFormat={}{0:C}}" Language="ru-Ru" Style="{StaticResource TextBlock}" Uid="{Binding ProductArticleNumber}" Loaded="countPr_Loaded"/>
  58. <TextBlock Name="countDPr" Style="{StaticResource TextBlock}" Language="ru-Ru" Uid="{Binding ProductArticleNumber}" Visibility="Collapsed" Loaded="countDPr_Loaded" Margin="5,0,0,0"/>
  59. </StackPanel>
  60. </StackPanel>
  61. <TextBlock Name="Discount" Loaded="Discount_Loaded" Uid="{Binding ProductArticleNumber}" Style="{StaticResource TextBlock}" Grid.Column="2" VerticalAlignment="Center"/>
  62. </Grid>
  63. </Border>
  64. <Border BorderBrush="#498C51" BorderThickness="3" CornerRadius="5" Grid.Column="1" Margin="20,0,10,0">
  65. <Grid>
  66. <Grid.ColumnDefinitions>
  67. <ColumnDefinition/>
  68. <ColumnDefinition/>
  69. <ColumnDefinition/>
  70. </Grid.ColumnDefinitions>
  71. <Button Name="Back_B" Content="-" Style="{StaticResource ButtonAct}" MaxHeight="30" MinWidth="30" MaxWidth="50" Click="Back_B_Click" Uid="{Binding ProductArticleNumber}" HorizontalAlignment="Center" Loaded="Back_B_Loaded"/>
  72. <TextBlock x:Name="CountProduct" Grid.Column="1" Text="1" Style="{StaticResource TextBlockBold}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="22" Loaded="CountProduct_Loaded" Uid="{Binding ProductArticleNumber}"/>
  73. <Button Name="Next_B" Content="+" Style="{StaticResource ButtonAct}" Grid.Column="2" MaxHeight="30" MinWidth="30" MaxWidth="50" Click="Next_B_Click" Uid="{Binding ProductArticleNumber}" HorizontalAlignment="Center" Loaded="Next_B_Loaded"/>
  74. </Grid>
  75. </Border>
  76. </Grid>
  77. </DataTemplate>
  78. </ListBox.ItemTemplate>
  79. <ListBox.ContextMenu>
  80. <ContextMenu>
  81. <MenuItem Name="DelProduct" Header="Удалить из корзины" Click="DelProduct_Click"/>
  82. </ContextMenu>
  83. </ListBox.ContextMenu>
  84. </ListBox>
  85. <StackPanel Orientation="Vertical" Grid.Row="2" HorizontalAlignment="Right" Margin="20,0">
  86. <TextBlock x:Name="TB_ItogoSkidka" Style="{StaticResource TextBlockMain}" HorizontalAlignment="Right"/>
  87. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  88. <TextBlock Text="ИТОГО: " Style="{StaticResource TextBlockMain}"/>
  89. <TextBlock x:Name="TB_Itogo" Style="{StaticResource TextBlockMain}" />
  90. </StackPanel>
  91. <StackPanel x:Name="SP_EditOrder" Loaded="SP_EditOrder_Loaded" Orientation="Horizontal">
  92. <TextBlock Text="Статус заказа: " Style="{StaticResource TextBlockMain}"/>
  93. <ComboBox Name="StateOrder" MaxHeight="50" MinWidth="150" Margin="5"/>
  94. </StackPanel>
  95. <StackPanel x:Name="SP_EditDate" Loaded="SP_EditOrder_Loaded" Orientation="Horizontal">
  96. <TextBlock Text="Дата выдачи: " Style="{StaticResource TextBlockMain}"/>
  97. <DatePicker Name="DP_Order" MaxHeight="50" MinWidth="150" Margin="5"/>
  98. </StackPanel>
  99. </StackPanel>
  100. <Button Name="B_Save" Content="Оформить заказ" Style="{StaticResource ButtonSt}" Margin="10,5" MaxHeight="50" MinWidth="90" MaxWidth="150" Click="B_Save_Click" Grid.Row="3"/>
  101. </Grid>
  102. </Page>