123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <Page x:Class="Sessioa.Pages.OrderCard"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:Sessioa.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- FontFamily="Comic Sans MS"
- FontSize="16"
- Title="Корзина с товарами">
- <Page.Resources>
- <BitmapImage x:Key="defaultImage" UriSource="/Resources/picture.png"/>
- </Page.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition Height="8.5*"/>
- <RowDefinition Height="2.5*"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <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"/>
- <TextBlock x:Name="OrderTitle" Style="{StaticResource TextBlockMain}" VerticalAlignment="Center" Margin="0,0,10,0"/>
- <TextBlock x:Name="OrderCode" Style="{StaticResource TextBlockMain}" VerticalAlignment="Center" Loaded="OrderCode_Loaded"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="30,0" VerticalAlignment="Center">
- <TextBlock Text="Пункт выдачи: " Style="{StaticResource TextBlock}" VerticalAlignment="Center"/>
- <ComboBox Name="CB_Punkt" MaxHeight="50" MinWidth="250" Margin="5"/>
- <TextBlock Name="TB_Punkt" Style="{StaticResource TextBlock}" VerticalAlignment="Center" Visibility="Collapsed"/>
- </StackPanel>
- <ListBox Name="LB_ProductsOrder" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="1">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="0.2*"/>
- </Grid.ColumnDefinitions>
- <Border BorderBrush="#498C51" BorderThickness="3" CornerRadius="5" Margin="10,0,0,0">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.3*"/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="0.2*"/>
- </Grid.ColumnDefinitions>
- <Image Source="{Binding ProductPhoto, TargetNullValue={StaticResource defaultImage}}" Margin="5" MaxWidth="80"/>
- <StackPanel Grid.Column="1">
- <TextBlock Text="{Binding ProductName}" Style="{StaticResource TextBlockBold}"/>
- <TextBlock Text="{Binding ProductDescription}" Style="{StaticResource TextBlock}"/>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Производитель:" Style="{StaticResource TextBlock}" Margin="0,0,5,0"/>
- <TextBlock Text="{Binding Manufacturer.Manufacturer1}" Style="{StaticResource TextBlock}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Цена: " Style="{StaticResource TextBlock}" Margin="0,0,5,0"/>
- <TextBlock Name="countPr" Text="{Binding ProductCost, StringFormat={}{0:C}}" Language="ru-Ru" Style="{StaticResource TextBlock}" Uid="{Binding ProductArticleNumber}" Loaded="countPr_Loaded"/>
- <TextBlock Name="countDPr" Style="{StaticResource TextBlock}" Language="ru-Ru" Uid="{Binding ProductArticleNumber}" Visibility="Collapsed" Loaded="countDPr_Loaded" Margin="5,0,0,0"/>
- </StackPanel>
- </StackPanel>
- <TextBlock Name="Discount" Loaded="Discount_Loaded" Uid="{Binding ProductArticleNumber}" Style="{StaticResource TextBlock}" Grid.Column="2" VerticalAlignment="Center"/>
- </Grid>
- </Border>
- <Border BorderBrush="#498C51" BorderThickness="3" CornerRadius="5" Grid.Column="1" Margin="20,0,10,0">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <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"/>
- <TextBlock x:Name="CountProduct" Grid.Column="1" Text="1" Style="{StaticResource TextBlockBold}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="22" Loaded="CountProduct_Loaded" Uid="{Binding ProductArticleNumber}"/>
- <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"/>
- </Grid>
- </Border>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- <ListBox.ContextMenu>
- <ContextMenu>
- <MenuItem Name="DelProduct" Header="Удалить из корзины" Click="DelProduct_Click"/>
- </ContextMenu>
- </ListBox.ContextMenu>
- </ListBox>
- <StackPanel Orientation="Vertical" Grid.Row="2" HorizontalAlignment="Right" Margin="20,0">
- <TextBlock x:Name="TB_ItogoSkidka" Style="{StaticResource TextBlockMain}" HorizontalAlignment="Right"/>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <TextBlock Text="ИТОГО: " Style="{StaticResource TextBlockMain}"/>
- <TextBlock x:Name="TB_Itogo" Style="{StaticResource TextBlockMain}" />
- </StackPanel>
- <StackPanel x:Name="SP_EditOrder" Loaded="SP_EditOrder_Loaded" Orientation="Horizontal">
- <TextBlock Text="Статус заказа: " Style="{StaticResource TextBlockMain}"/>
- <ComboBox Name="StateOrder" MaxHeight="50" MinWidth="150" Margin="5"/>
- </StackPanel>
- <StackPanel x:Name="SP_EditDate" Loaded="SP_EditOrder_Loaded" Orientation="Horizontal">
- <TextBlock Text="Дата выдачи: " Style="{StaticResource TextBlockMain}"/>
- <DatePicker Name="DP_Order" MaxHeight="50" MinWidth="150" Margin="5"/>
- </StackPanel>
- </StackPanel>
- <Button Name="B_Save" Content="Оформить заказ" Style="{StaticResource ButtonSt}" Margin="10,5" MaxHeight="50" MinWidth="90" MaxWidth="150" Click="B_Save_Click" Grid.Row="3"/>
- </Grid>
- </Page>
|