1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <Page x:Class="GGwp.Guest"
- 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:GGwp"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="Guest">
- <Grid Background="LightGreen">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="10*"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <Button BorderBrush="White" BorderThickness="2" Foreground="Green" Background="LightGreen" Width="100" Height="30" Click="CartGo" Name="ToCart" Content="Корзина" Visibility="Hidden"/>
- <ComboBox Foreground="Green" Background="LightGreen" SelectionChanged="SortFilterChanged" Name="SortByName" Height="30" Margin="10,0,0,0" Width="200"/>
- <ComboBox Foreground="Green" Background="LightGreen" SelectionChanged="SortFilterChanged" Name="FilterByPromo" Height="30" Margin="10,0,0,0" Width="200"/>
- <TextBox TextChanged="SearchChanged" Name="SearchByName" Height="30" TextAlignment="Center" Margin="10,0,0,0" Width="200"/>
- <TextBlock TextAlignment="Center" Margin="10,0,0,0" Name="AmountOfData"/>
- <Button BorderBrush="White" BorderThickness="2" Foreground="Green" Background="LightGreen" Width="100" Height="30" Click="BackToAuth" Content="Выйти"/>
- </StackPanel>
- <ListView Background="White" Grid.Row="1" Name="ProductList" d:ItemsSource="{d:SampleData ItemCount=5}">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" HorizontalAlignment="Center"/>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Width="800" Height="200" BorderThickness="1" BorderBrush="Black">
- <StackPanel>
- <StackPanel.ContextMenu>
- <ContextMenu>
- <MenuItem Header="Добавить в корзину" Uid="{Binding ProductArticleNumber}" Click="CartAdd"/>
- </ContextMenu>
- </StackPanel.ContextMenu>
- <Grid Width="795" Height="195" Loaded="BackgroundLoad" Uid="{Binding ProductArticleNumber}">
- <StackPanel Orientation="Horizontal">
- <Image Width="200" Height="195" Grid.Column="0" Uid="{Binding ProductArticleNumber}" Loaded="Photo"/>
- <StackPanel Margin="10,0,0,0" Width="300" HorizontalAlignment="Center" Grid.Column="1" Orientation="Vertical">
- <TextBlock Foreground="Green" Text="{Binding ProductName}"/>
- <TextBlock Foreground="Green" Text="{Binding ProductDescription}" TextWrapping="Wrap"/>
- <TextBlock Foreground="Green" Text="{Binding StringFormat=Произоводитель: {0},Path=Manufacturers.ManufacturerName}"/>
- <TextBlock Foreground="Green" Text="{Binding ProductCost}" Uid="{Binding ProductArticleNumber}" Loaded="StrikePrice"/>
- <TextBlock Foreground="Green" Text="{Binding ProductCost}" Uid="{Binding ProductArticleNumber}" Loaded="PromoPrice"/>
- </StackPanel>
- <TextBlock FontWeight="Bold" Foreground="Green" Margin="10,0,0,0" HorizontalAlignment="Center" Grid.Column="2" Text="{Binding StringFormat=Скидка: {0}%, Path=ProductMaxDiscountAmount}"/>
- </StackPanel>
- </Grid>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- <StackPanel Name="ButtonsForAdmin" Visibility="Hidden" HorizontalAlignment="Center" Orientation="Horizontal" Grid.Row="2">
- <Button BorderBrush="White" BorderThickness="2" Foreground="Green" Background="LightGreen" Width="70" Height="30" Content="Добавить"/>
- <Button BorderBrush="White" BorderThickness="2" Foreground="Green" Background="LightGreen" Margin="10,0,0,0" Height="30" Width="90" Content="Редактировать"/>
- <Button BorderBrush="White" BorderThickness="2" Foreground="Green" Background="LightGreen" Margin="10,0,0,0" Height="30" Width="70" Content="Удалить"/>
- <Button BorderBrush="White" BorderThickness="2" Foreground="Green" Background="LightGreen" Margin="10,0,0,0" Name="ViewOrder" Width="130" Height="30" Click="ViewOrders" Content="Посмотреть заказы"/>
-
- </StackPanel>
-
- </Grid>
- </Page>
|