123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <Window x:Class="OOO_WriteAndClear.MVP.Views.OrderReceipt"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:OOO_WriteAndClear.MVP.Views"
- mc:Ignorable="d" Icon="../../Assets/Pictures/icon.ico"
- Title="Пиши-стирай | Талон заказа" Height="450" Width="1200"
- MinWidth="1200" MinHeight="450"
- FontFamily="Comic Sans MS">
- <Window.Resources>
-
- <Style x:Key="OrdersListViewStyle" TargetType="{x:Type ListView}">
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
- <Setter Property="ItemTemplate">
- <Setter.Value>
- <DataTemplate DataType="db_models:Order">
- <Border Padding="10"
- BorderBrush="Black"
- CornerRadius="10">
- <Grid HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition/>
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2"
- HorizontalAlignment="Center" VerticalAlignment="Top"
- Text="{Binding OrderId, StringFormat=Номер заказа №{0}}" />
- <StackPanel Grid.Row="1" Grid.Column="0"
- Margin="0 5 0 0"
- Orientation="Vertical">
- <TextBlock Text="{Binding OrderCustomer, StringFormat=Заказчик: {0}, TargetNullValue=NA}"/>
- <TextBlock Text="{Binding OrderCreateDate, StringFormat=Дата создания: {0}}"/>
- <TextBlock Text="{Binding OrderDeliveryDate, StringFormat=Дата готовности: {0}}"/>
- <TextBlock Text="{Binding OrderPickupPoint.PickupPointAdress, StringFormat=Адресс пункта выдачи: {0}}"
- TextWrapping="Wrap"/>
- <TextBlock Text="{Binding OrderCostWithoutDiscount, StringFormat=Цена без скидки {0:f2} руб.}"/>
- <TextBlock Text="{Binding OrderReceiveCode, StringFormat=Код получения заказа: {0}}"/>
- </StackPanel>
- <Border Grid.Column="1" Grid.Row="1"
- Margin="0 5 0 0">
- <DataGrid
- ItemsSource="{Binding OrderProducts}"
- IsReadOnly="True"
- AutoGenerateColumns="False"
- Background="White"
- CanUserResizeColumns="False">
- <DataGrid.Columns>
- <DataGridTextColumn Header="Количество"
- CanUserSort="False"
- Binding="{Binding ProductAmount}"/>
- <DataGridTextColumn Header="Артикул"
- CanUserSort="False"
- Binding="{Binding ProductArticleNumber}"/>
- <DataGridTextColumn Header="Продукт"
- CanUserSort="False"
- Binding="{Binding ProductArticleNumberNavigation.ProductName}"/>
- <DataGridTextColumn Header="Цена без скидки"
- CanUserSort="False"
- Binding="{Binding PriceWithoutDiscount, StringFormat={}{0:f2} руб.}"/>
- <DataGridTextColumn Header="Цена со скидкой"
- CanUserSort="False"
- Binding="{Binding Price, StringFormat={}{0:f2} руб.}"/>
- </DataGrid.Columns>
- </DataGrid>
- </Border>
- <TextBlock Grid.Row="2" Grid.ColumnSpan="2"
- HorizontalAlignment="Center"
- Margin="0 5 0 0"
- Text="{Binding OrderCost, StringFormat=Итог: {0:f2} руб.}"/>
- <TextBlock Grid.Row="2" Grid.ColumnSpan="2"
- HorizontalAlignment="Right"
- Margin="0 5 0 0"
- Text="{Binding OrderDiscountPercent, StringFormat=Суммарная скидка: {0:p2}}"/>
- </Grid>
- </Border>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </Window.Resources>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Label Grid.Row="0"
- HorizontalAlignment="Center"
- FontSize="18" FontWeight="Bold"
- Content="Талон заказа"/>
- <ListView x:Name="ConfirmedOrder"
- Grid.Row="1"
- Style="{StaticResource OrdersListViewStyle}"
- d:ItemsSource="{d:SampleData ItemCount=5}"/>
- </Grid>
-
- </Window>
|