1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <Page x:Class="ExamTry.Pages.AgentPage"
- 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:ExamTry.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="AgentPage">
- <Page.Resources>
- <Style x:Key="styleSale" TargetType="StackPanel">
- <Style.Triggers>
- <DataTrigger Binding="{Binding greenSale}" Value="true">
- <Setter Property="Background" Value="#FF5CF95C"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- <DataTemplate x:Key="AgentData">
- <StackPanel Style="{StaticResource styleSale}" HorizontalAlignment="Center" Orientation="Horizontal">
- <StackPanel Margin="10">
- <Image Width="80" Height="80" Source="{Binding GetImage}"/>
- </StackPanel>
- <StackPanel Width="800" Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding AgentType.Title}"/>
- <TextBlock Text=" | "/>
- <TextBlock Text="{ Binding Title}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding GetProductionYear}"/>
- <TextBlock Text=" продажи за год"/>
- </StackPanel>
- <TextBlock Text="{Binding Phone}"/>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Приоритетность: "/>
- <TextBlock Text="{Binding Priority}"/>
- </StackPanel>
- </StackPanel>
- <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top">
- <TextBlock Text="{Binding GetProductionSale}"/>
- </StackPanel>
- </StackPanel>
- </DataTemplate>
- </Page.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="206*"/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Vertical" >
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <TextBox Text="{Binding SetTextForSort}" Margin="5" Width="100"/>
- <ComboBox SelectedIndex="{Binding GetIndexOrderBy}" Margin="5" Width="100">
- <ComboBoxItem >
- По возрастанию
- </ComboBoxItem>
- <ComboBoxItem>
- По убыванию
- </ComboBoxItem>
- </ComboBox>
- <ComboBox SelectedIndex="{Binding GetIndexSort}" Margin="5" Width="100">
- <ComboBoxItem>
- Наименованию
- </ComboBoxItem>
- <ComboBoxItem>
- Размер скидки
- </ComboBoxItem>
- <ComboBoxItem>
- Приоритет агента
- </ComboBoxItem>
- </ComboBox>
- <ComboBox SelectedIndex="{Binding GetTypeIndex}" ItemsSource="{Binding GetTypeAgent}" Margin="5" Width="100"/>
- <Button Content="Добавить агента"
- Name="AddAgent"
- Click="OpenWindowAddAgent"/>
- <Button
- Click="ChagePrior"
- x:Name="prioritetyBtn"
- Visibility="Collapsed"
- Content="Изменить приоритет на ...">
- </Button>
- </StackPanel>
- </StackPanel>
- <ListBox
- x:Name="AgentList"
- Grid.Row="1"
- ItemsSource="{Binding GetAgents}"
- ItemTemplate="{StaticResource AgentData}"
- HorizontalAlignment="Center"
- SelectionMode="Extended"
- SelectionChanged="AgentList_SelectionChanged"
- MouseDoubleClick="EditAgent"
- SelectedItem="{Binding GetAgent}"/>
- </Grid>
- </Page>
|