12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <Page x:Class="Sessioa.Pages.ProductsPage"
- 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"
- Title="ProductsPage">
- <Page.Resources>
- <BitmapImage x:Key="defaultImage" UriSource="/Resources/picture.png"/>
- </Page.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="0.07*"/>
- <RowDefinition Height="0.1*"/>
- <RowDefinition/>
- <RowDefinition Height="0.07*"/>
- </Grid.RowDefinitions>
- <ListBox Name="LB_Product" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="2">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border BorderBrush="#498C51" BorderThickness="3" CornerRadius="5" Uid="{Binding ProductArticleNumber}" Loaded="Border_Loaded">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.3*"/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="0.5*"/>
- <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}" Uid="{Binding ProductArticleNumber}" Visibility="Collapsed" Loaded="countPr_Loaded_1" 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>
- </DataTemplate>
- </ListBox.ItemTemplate>
- <ListBox.ContextMenu>
- <ContextMenu Loaded="ContextMenu_Loaded">
- <MenuItem Name="AddOrder" Header="Добавить к заказу"/>
- <MenuItem Name="EditProduct" Header="Редактировать" Loaded="EditProduct_Loaded" Click="EditProduct_Click"/>
- <MenuItem Name="DeleteProduct" Header="Удалить" Loaded="DeleteProduct_Loaded" Click="DeleteProduct_Click"/>
- </ContextMenu>
- </ListBox.ContextMenu>
- </ListBox>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="7*"/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBox Name="SearchTB" TextChanged="SearchTB_TextChanged" Style="{StaticResource TextBox}" MaxHeight="60" Margin="6" DataContext="Поиск"/>
- <ComboBox Name="CB_Sort" SelectionChanged="CB_Sort_SelectionChanged" MaxHeight="60" Margin="6" Grid.Column="1" FontFamily="Comic Sans MS" FontSize="16" VerticalContentAlignment="Center" FontWeight="Light"/>
- <ComboBox Name="CB_Filtr" SelectionChanged="CB_Filtr_SelectionChanged" MaxHeight="60" Margin="6" Grid.Column="2" FontFamily="Comic Sans MS" FontSize="16" VerticalContentAlignment="Center" FontWeight="Light"/>
- </Grid>
- <StackPanel Grid.Row="3" HorizontalAlignment="Center" Orientation="Horizontal" VerticalAlignment="Center">
- <TextBlock Name="TB_CountActual" Style="{StaticResource TextBlock}"/>
- <TextBlock Text=" из " Style="{StaticResource TextBlock}"/>
- <TextBlock Name="TB_CountAll" Style="{StaticResource TextBlock}"/>
- </StackPanel>
- <TextBlock Name="UserSign" HorizontalAlignment="Right" Style="{StaticResource TextBlock}" Margin="30,0"/>
- <StackPanel Orientation="Horizontal">
- <Button Name="SignOf" Content="Выйти" Style="{StaticResource ButtonAct}" Margin="10,0" MaxHeight="50" MinWidth="90" MaxWidth="150" Click="SignOf_Click" HorizontalAlignment="Left"/>
- <Button Name="NewProduct" Content="Добавить продукт" Style="{StaticResource ButtonSt}" Margin="10,0" MaxHeight="50" MinWidth="90" MaxWidth="150" Click="NewProduct_Click" HorizontalAlignment="Left" Visibility="Collapsed" Loaded="NewProduct_Loaded"/>
- </StackPanel>
- </Grid>
- </Page>
|