166 lines
4.0 KiB
XML
166 lines
4.0 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
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"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="TovarV2.ProductEdit"
|
|
Title="ProductEdit"
|
|
x:CompileBindings="False">
|
|
<Grid
|
|
Background="Gray"
|
|
Name="gridProdEd"
|
|
ShowGridLines="false"
|
|
RowDefinitions="70, 450, 70, *"
|
|
ColumnDefinitions="*,*">
|
|
<StackPanel
|
|
Grid.Column="0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal"
|
|
Grid.Row="0">
|
|
<TextBlock
|
|
TextAlignment="Left"
|
|
Text="Список товаров">
|
|
</TextBlock>
|
|
<StackPanel
|
|
Width="250"
|
|
Margin="50, 0, 0, 0"
|
|
Orientation="Vertical">
|
|
<TextBlock
|
|
Text="Поиск">
|
|
</TextBlock>
|
|
<StackPanel
|
|
Margin="0, 10, 0, 0"
|
|
Orientation="Horizontal">
|
|
<TextBox
|
|
Watermark="Наименование товара"
|
|
Width="200"
|
|
KeyUp="PoiskTov_OnKeyUp"
|
|
Name="FindProd">
|
|
</TextBox>
|
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel
|
|
HorizontalAlignment="Right"
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal"
|
|
Grid.Row="0">
|
|
<Button
|
|
Background="Salmon"
|
|
Click="BtnVyhod_OnClick"
|
|
Content="Выход">
|
|
</Button>
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="1">
|
|
<StackPanel
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Name="backBtn"
|
|
Click="PrevPage_OnClick"
|
|
Content="back">
|
|
</Button>
|
|
<ListBox
|
|
Background="FloralWhite"
|
|
SelectionMode="Single"
|
|
Height="380"
|
|
Width="500"
|
|
Name="ProdList">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border
|
|
Margin="0,10,0,0"
|
|
CornerRadius="5"
|
|
BorderBrush="Gray"
|
|
BorderThickness="1"
|
|
Padding="5">
|
|
<ScrollViewer>
|
|
<StackPanel
|
|
Background="Orange"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Text="{Binding nameProd}">
|
|
</TextBlock>
|
|
<TextBlock
|
|
Margin="10, 0, 0, 0"
|
|
Text="{Binding priceProd}">
|
|
</TextBlock>
|
|
<TextBlock
|
|
Margin="10, 0, 0, 0"
|
|
Text="{Binding quantityProd}">
|
|
</TextBlock>
|
|
<Image
|
|
Source="{Binding bitmapProd}"
|
|
Height="100"
|
|
Width="100">
|
|
</Image>
|
|
<Button
|
|
Tag="{Binding Id}"
|
|
Content="Добавить"
|
|
Height="25"
|
|
Name="AddToKorzinaBtn"
|
|
Click="AddToKorzBtn_OnClick"
|
|
Margin="60, 0, 0, 0"
|
|
Width="90">
|
|
</Button>
|
|
<Button
|
|
Tag="{Binding Id}"
|
|
Height="25"
|
|
Content="Удалить"
|
|
Click="DelBtn_Click"
|
|
Margin="60, 0, 0, 0"
|
|
Width="90">
|
|
</Button>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<Button
|
|
Height="50"
|
|
Name="nextBtn"
|
|
Click="NextPage_OnClick"
|
|
Content="next">
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
<TextBlock
|
|
Height="40"
|
|
Name="pageNum">
|
|
</TextBlock>
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Background="Salmon"
|
|
Name="AddElementBtn"
|
|
Click="BtnInsert_OnClick"
|
|
Content="Добавить элемент">
|
|
</Button>
|
|
<Button
|
|
Background="Salmon"
|
|
Name="EditTovarBtn"
|
|
Click="BtnEditTovar_OnClick"
|
|
Content="Редактировать товар">
|
|
</Button>
|
|
</StackPanel>
|
|
<Button
|
|
Background="Salmon"
|
|
Name="GoToKorzinaBtn"
|
|
Click="BtnKorzina_OnClick"
|
|
Content="Перейти в корзину">
|
|
</Button>
|
|
|
|
<StackPanel
|
|
Background="FloralWhite"
|
|
Name="editing"
|
|
Grid.Row="3">
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|