Agents/MainWindow.axaml
2025-03-28 10:43:34 +03:00

167 lines
5.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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="1000" d:DesignHeight="450"
x:Class="Agents.MainWindow"
Title="Агенты"
Icon="avares://Agents/Assets/Icon.ico"
xmlns:vm="using:Agents.Models">
<DockPanel Background="Blue">
<ScrollViewer>
<StackPanel>
<StackPanel Orientation="Horizontal">
<Border
Background="Red"
CornerRadius="10"
Padding="20"
Margin="20"
Width="450"
Height="400"
>
<ScrollViewer>
<StackPanel>
<TextBlock Text="Список компаний" HorizontalAlignment="Center" Foreground="Blue"/>
<ListBox Name="ListAgents" SelectionChanged="ListBox_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="vm:Agent">
<StackPanel Background="White" HorizontalAlignment="Center" Width="400" Height="350" Spacing="5">
<StackPanel HorizontalAlignment="Left">
<Image
Height="200"
Width="200"
Name="MainImage"
Source="{Binding getLogo}"
/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Название компании: " Foreground="Black"/>
<TextBlock Text="{Binding Title}" Foreground="Black"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="ИНН: " Foreground="Black"/>
<TextBlock Text="{Binding Inn}" Foreground="Black"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="КПП: " Foreground="Black"/>
<TextBlock Text="{Binding Kpp}" Foreground="Black"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Имя директора: " Foreground="Black"/>
<TextBlock Text="{Binding Directorname}" Foreground="Black"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Телефон компании: " Foreground="Black"/>
<TextBlock Text="{Binding Phone}" Foreground="Black"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Адрес: " Foreground="Black"/>
<TextBlock Text="{Binding Address}" Foreground="Black" Width="350" TextWrapping="Wrap"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</ScrollViewer>
</Border>
<StackPanel>
<TextBlock Text="Веберите сортировку списка продуктов компании" HorizontalAlignment="Center"/>
<ComboBox Name="SortListAgents" HorizontalAlignment="Center">
<ComboBoxItem>
без. сорт.
</ComboBoxItem>
<ComboBoxItem>
убыв.
</ComboBoxItem>
<ComboBoxItem>
возраст.
</ComboBoxItem>
</ComboBox>
<Border
Background="Red"
CornerRadius="10"
Padding="20"
Margin="20"
Width="450"
Height="400"
>
<ScrollViewer>
<StackPanel>
<TextBlock Text="Товары продавца" HorizontalAlignment="Center" Foreground="Blue"/>
<ListBox Name="ListProducts" SelectionChanged="ListBox_SelectionChanged1">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="vm:Product">
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Название продукта: "/>
<TextBlock Text="{Binding Title}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Описание товара: "/>
<TextBlock Text="{Binding Description}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Название продукта: "/>
<TextBlock Text="{Binding Productionpersoncount}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Артикул: "/>
<TextBlock Text="{Binding Articlenumber}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Минимальная цена для агента: "/>
<TextBlock Text="{Binding Mincostforagent}"/>
<TextBlock Text=" Руб."/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</ScrollViewer>
</Border>
</StackPanel>
</StackPanel>
<StackPanel>
<Border
Background="Red"
CornerRadius="10"
Padding="20"
Margin="20"
Height="80"
>
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="Доступные функции" HorizontalAlignment="Center" Foreground="Blue"/>
<StackPanel Orientation="Horizontal" Background="Red" HorizontalAlignment="Center">
<Button Content="Обновить продукт" Click="ButtonProductEidtor" Background="Green"/>
<Button Content="Изменить агентов" Click="ButtonAgentEidtor" Background="Green"/>
<Button Content="Добавление и удаление продукта" Click="ButtonAddProduct" Background="Green"/>
<Button Content="Редактированть данные продуктов" Click="ButtonProductEidtor" Background="Green"/>
</StackPanel>
</StackPanel>
</Border>
</StackPanel>
</StackPanel>
</ScrollViewer>
</DockPanel>
</Window>