Policlinica2/Policlinica/Views/RecordItemsView.axaml

71 lines
3.5 KiB
XML

<UserControl 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"
xmlns:viewModels="clr-namespace:Policlinica.ViewModels"
mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="700"
x:Class="Policlinica.Views.RecordItemsView"
x:DataType="viewModels:RecordItemsViewModel">
<StackPanel Margin="30" Spacing="20">
<TextBlock Text="Подтверждение записи" FontSize="24" FontWeight="Bold" HorizontalAlignment="Center"/>
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
<StackPanel Spacing="10">
<TextBlock Text="Клиент:" FontWeight="Bold" FontSize="16"/>
<TextBlock Text="{Binding ClientName}" FontSize="14"/>
<TextBlock Text="{Binding ClientSurname}" FontSize="14"/>
</StackPanel>
</Border>
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
<StackPanel Spacing="10">
<TextBlock Text="Врач:" FontWeight="Bold" FontSize="16"/>
<TextBlock Text="{Binding SelectedDoctor.Title}" FontSize="14"/>
</StackPanel>
</Border>
<Border BorderBrush="LightGray" BorderThickness="1" Padding="15" CornerRadius="5">
<StackPanel Spacing="10">
<TextBlock Text="Выбранные услуги:" FontWeight="Bold" FontSize="16"/>
<ListBox ItemsSource="{Binding SelectedServices}" MinHeight="150">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Spacing="20" Margin="5">
<TextBlock Text="{Binding ServiceName}" Width="300" FontSize="13"/>
<TextBlock Text="{Binding Price}" Width="100" FontSize="13"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Border>
<Border BorderBrush="DodgerBlue" BorderThickness="2" Padding="20" CornerRadius="5" Background="WhiteSmoke">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="30">
<TextBlock Text="Итого:" FontWeight="Bold" FontSize="16"/>
<TextBlock Text="{Binding TotalAmount}" FontSize="18" FontWeight="Bold" Foreground="DodgerBlue"/>
</StackPanel>
</Border>
<TextBlock Text="{Binding StatusMessage}" Foreground="Green" FontSize="14" TextWrapping="Wrap"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="20">
<Button Content="Сохранить запись"
FontSize="16"
Padding="20,12"
Background="Green"
Foreground="White"
Command="{Binding SaveToDatabaseCommand}"/>
<Button Content="Вернуться"
FontSize="16"
Padding="20,12"
Background="Gray"
Foreground="White"
Command="{Binding CancelCommand}"/>
</StackPanel>
</StackPanel>
</UserControl>