Agents/MainWindow.axaml

208 lines
7.5 KiB
Plaintext
Raw Permalink Normal View History

2025-03-24 09:34:12 +00:00
<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"
2025-03-28 07:43:34 +00:00
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="450"
2025-03-24 09:34:12 +00:00
x:Class="Agents.MainWindow"
Title="Агенты"
2025-03-28 07:43:34 +00:00
Icon="avares://Agents/Assets/Icon.ico"
2025-03-24 09:34:12 +00:00
xmlns:vm="using:Agents.Models">
<DockPanel Background="Blue">
<ScrollViewer>
2025-03-29 19:54:15 +00:00
<StackPanel Spacing="15">
2025-03-24 09:34:12 +00:00
2025-03-29 19:54:15 +00:00
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="1">
2025-04-05 17:05:02 +00:00
<TextBox Name="search" Width="400" Background="Black" Watermark="ПОИСК" Text=""/>
2025-03-29 19:54:15 +00:00
<Button Content="Найти" Background="Yellow" Foreground="Black" Click="Button_search"/>
</StackPanel>
2025-03-28 07:43:34 +00:00
<StackPanel Orientation="Horizontal">
2025-03-29 19:54:15 +00:00
<StackPanel>
<TextBlock Text="Веберите сортировку списка продуктов компании" HorizontalAlignment="Center" Foreground="White"/>
2025-03-28 07:43:34 +00:00
2025-03-29 19:54:15 +00:00
<ComboBox Name="SortListAgents" HorizontalAlignment="Center" SelectionChanged="SortAg">
<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"/>
2025-04-05 17:05:02 +00:00
<ListBox Name="ListAgents" SelectionChanged="ListAgents_SelectionChanged">
2025-03-29 19:54:15 +00:00
<ListBox.ItemTemplate>
<DataTemplate x:DataType="vm:Agent">
<StackPanel Background="White" HorizontalAlignment="Center" Width="400" Height="350" Spacing="5">
2025-03-28 07:43:34 +00:00
2025-03-29 19:54:15 +00:00
<StackPanel HorizontalAlignment="Left">
<Image
Height="200"
Width="200"
Name="MainImage"
Source="{Binding getLogo}"
/>
</StackPanel>
2025-03-28 07:43:34 +00:00
2025-03-29 19:54:15 +00:00
<StackPanel Orientation="Horizontal">
<TextBlock Text="Название компании: " Foreground="Black"/>
<TextBlock Text="{Binding Title}" Foreground="Black"/>
</StackPanel>
2025-03-28 07:43:34 +00:00
2025-03-29 19:54:15 +00:00
<StackPanel Orientation="Horizontal">
<TextBlock Text="ИНН: " Foreground="Black"/>
<TextBlock Text="{Binding Inn}" Foreground="Black"/>
</StackPanel>
2025-03-28 07:43:34 +00:00
2025-03-29 19:54:15 +00:00
<StackPanel Orientation="Horizontal">
<TextBlock Text="КПП: " Foreground="Black"/>
<TextBlock Text="{Binding Kpp}" Foreground="Black"/>
</StackPanel>
2025-03-28 07:43:34 +00:00
2025-03-29 19:54:15 +00:00
<StackPanel Orientation="Horizontal">
<TextBlock Text="Имя директора: " Foreground="Black"/>
<TextBlock Text="{Binding Directorname}" Foreground="Black"/>
</StackPanel>
2025-03-28 07:43:34 +00:00
2025-03-29 19:54:15 +00:00
<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>
2025-03-24 09:34:12 +00:00
2025-03-29 19:54:15 +00:00
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</ScrollViewer>
</Border>
2025-03-24 09:34:12 +00:00
2025-03-29 19:54:15 +00:00
</StackPanel>
2025-03-24 09:34:12 +00:00
2025-03-28 07:43:34 +00:00
<StackPanel>
2025-03-29 19:54:15 +00:00
<TextBlock Text="Веберите сортировку списка продуктов компании" HorizontalAlignment="Center" Foreground="White"/>
2025-04-05 17:05:02 +00:00
<ComboBox Name="SortListProductAgents" HorizontalAlignment="Center" SelectionChanged="SortListProductAgents_method">
2025-03-28 07:43:34 +00:00
<ComboBoxItem>
без. сорт.
</ComboBoxItem>
<ComboBoxItem>
убыв.
</ComboBoxItem>
<ComboBoxItem>
возраст.
</ComboBoxItem>
</ComboBox>
<Border
Background="Red"
CornerRadius="10"
Padding="20"
Margin="20"
Width="450"
Height="400"
>
<ScrollViewer>
<StackPanel>
2025-04-05 17:05:02 +00:00
<TextBlock Text="Товары агента" HorizontalAlignment="Center" Foreground="Blue"/>
2025-03-29 19:54:15 +00:00
<ListBox Name="ListProducts">
2025-03-28 07:43:34 +00:00
<ListBox.ItemTemplate>
2025-04-05 17:05:02 +00:00
<DataTemplate x:DataType="vm:ProductDTO">
2025-03-28 07:43:34 +00:00
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Название продукта: "/>
<TextBlock Text="{Binding Title}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Описание товара: "/>
<TextBlock Text="{Binding Description}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
2025-04-05 17:05:02 +00:00
<TextBlock Text="Количество производственных сотрудников: "/>
2025-03-28 07:43:34 +00:00
<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>
2025-03-24 09:34:12 +00:00
2025-04-05 17:05:02 +00:00
<StackPanel Orientation="Horizontal">
<TextBlock Text="колличество продаж этого товара: "/>
<TextBlock Text="{Binding SalesCount}"/>
<TextBlock Text=" шт."/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Скидка на товар: "/>
<TextBlock Text="{Binding ProductDiscount}"/>
<TextBlock Text=" %"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Описание товара: "/>
<TextBlock Text="{Binding Description}" Width="300" TextWrapping="Wrap"/>
</StackPanel>
2025-03-24 09:34:12 +00:00
</StackPanel>
2025-03-28 07:43:34 +00:00
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</ScrollViewer>
</Border>
</StackPanel>
</StackPanel>
<StackPanel>
2025-03-24 09:34:12 +00:00
<Border
Background="Red"
CornerRadius="10"
Padding="20"
Margin="20"
Height="80"
>
<StackPanel HorizontalAlignment="Center">
2025-03-24 09:34:12 +00:00
<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"/>
2025-03-24 09:34:12 +00:00
</StackPanel>
</StackPanel>
</Border>
2025-03-28 07:43:34 +00:00
</StackPanel>
2025-03-24 09:34:12 +00:00
</StackPanel>
</ScrollViewer>
</DockPanel>
</Window>