123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <Page x:Class="WriteErase.ClassPages.PageOrderView"
- 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:WriteErase.ClassPages"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="PageOrderView"
- FontFamily="Comic Sans MS">
- <Grid Margin="15 10">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Button Name="btnBack"
- Content="Назад"
- Click="btnBackClick"
- Grid.Column="0"/>
- <WrapPanel Grid.Row="1" Grid.ColumnSpan="4" HorizontalAlignment="Center" Margin="0 0 0 5">
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Text="Сортировать по стоимости:"
- FontSize="16" Foreground="#498C51"
- Margin="10 0"/>
- <ComboBox Name="cbCost" SelectedIndex="0" SelectionChanged="cbCostSelectionChanged">
- <ComboBoxItem Content="Без сортировки"></ComboBoxItem>
- <ComboBoxItem Content="По возрастанию"></ComboBoxItem>
- <ComboBoxItem Content="По убыванию"></ComboBoxItem>
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Text="Фильтровать по скидке"
- FontSize="16" Foreground="#498C51"
- Margin="10 0"/>
- <ComboBox Name="cbDiscount" SelectedIndex="0" SelectionChanged="cbDiscountSelectionChanged">
- <ComboBoxItem Content="Все диапазоны"></ComboBoxItem>
- <ComboBoxItem Content="0-9.99%"></ComboBoxItem>
- <ComboBoxItem Content="10-14.99"></ComboBoxItem>
- <ComboBoxItem Content="15% и более"></ComboBoxItem>
- </ComboBox>
- </StackPanel>
- </WrapPanel>
- <ListView Name="lvOrder" Grid.Row="2" Grid.ColumnSpan="5"
- HorizontalContentAlignment="Stretch"
- Focusable="False"
- ScrollViewer.HorizontalScrollBarVisibility="Hidden">
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Padding="5 10"
- Margin="0 0 30 0"
- CornerRadius="15"
- BorderBrush="{Binding colorBorder}" BorderThickness="2">
- <Grid HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <TextBlock Text="{Binding OrderID, StringFormat='Номер заказа: {0}'}"
- Margin="0 0 15 0"
- Grid.Row="0" Grid.Column="0"
- FontSize="16" Foreground="#498C51"/>
- <StackPanel Grid.Row="0" Grid.Column="1" Margin="5 0 15 0">
- <TextBlock Text="{Binding OrderDate, StringFormat='Дата заказа: {0:dd MMMM yyyy}'}" Language="ru-RU" Foreground="#498C51"/>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Дата получения " Foreground="#498C51"/>
- <DatePicker SelectedDate="{Binding SelectDate}" Margin="5 0" Foreground="#498C51"/>
- </StackPanel>
- </StackPanel>
-
- <StackPanel Grid.Column="3" Orientation="Horizontal" Margin="15 0">
- <TextBlock Text="Статус заказа: "
- FontSize="16" Foreground="#498C51"/>
- <ComboBox
- ItemsSource="{Binding StatusList}"
- SelectedIndex="{Binding Status}"/>
- </StackPanel>
- <TextBlock
- Text="{Binding OrderClienr}"
- Grid.Row="0" Grid.Column="4"
- FontSize="16" Foreground="#498C51"/>
- <ListView ItemsSource="{Binding OrderProduct}"
- HorizontalContentAlignment="Stretch"
- Grid.Row="1" Grid.ColumnSpan="5"
- BorderThickness="0"
- Focusable="False">
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border BorderThickness="0,0,0,1" BorderBrush="#498C51" Margin="10 0">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="Auto"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="Auto"></RowDefinition>
- </Grid.RowDefinitions>
- <Image Name="image" Grid.Column="0"
- Source="{Binding Product.img}" Stretch="Uniform"
- Margin="5" Width="100" Height="100" MaxWidth="100" MaxHeight="100"/>
- <StackPanel Orientation="Vertical" Grid.Column="1" Margin="5">
- <TextBlock Text="{Binding Product.ProductName}" Foreground="#498C51"/>
- <TextBlock Text="{Binding Product.ProductDescription}" TextWrapping="Wrap" Foreground="#498C51"/>
- <TextBlock Text="{Binding Product.ProductManufacturer.ManufacturerName, StringFormat='Производитель: {0}'}" Foreground="#498C51"/>
- <TextBlock Text="{Binding Product.Cost, StringFormat='Цена за шт: {0:C2}'}" Language="ru-RU" Foreground="#498C51"/>
- </StackPanel>
- <TextBlock Text="{Binding CountProduct}" Grid.Row="1" Foreground="#498C51"/>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- <ListView.ItemContainerStyle>
- <Style TargetType="ListViewItem">
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- </Style>
- </ListView.ItemContainerStyle>
- </ListView>
- <Grid Grid.Row="2" Grid.ColumnSpan="4"
- HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
-
- <TextBlock Text="Сумма заказа: "
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Grid.Column="0"
- Foreground="#498C51"
- Margin="15 0 5 0"/>
-
- <StackPanel Orientation="Vertical"
- Grid.Column="1">
- <TextBlock Text="{Binding CostWithoutDiscount, StringFormat=' {0:C2}'}" Language="ru-RU" Foreground="#498C51"/>
- <TextBlock Text="{Binding CostWithDiscount, StringFormat=' {0:C2}'}"
- Language="ru-RU"
- Visibility="{Binding VisibilityCost}"
- TextDecorations="Strikethrough"
- Foreground="#498C51"/>
- </StackPanel>
- <TextBlock Text="{Binding ProcentCost, StringFormat='Скидка: {0}%'}"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Grid.Column="2"
- Margin="5 0"
- Foreground="#498C51"/>
-
- <TextBlock
- Text="{Binding OrderCode, StringFormat='Код получения: {0}'}"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Grid.Column="3"
- FontSize="16" Foreground="#498C51"/>
- </Grid>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- </Page>
|