Policlinica2/Policlinica/Views/RecordItemsView.axaml

82 lines
4.2 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<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">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<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"/>
<ScrollViewer MaxHeight="200" VerticalScrollBarVisibility="Auto">
<ListBox ItemsSource="{Binding SelectedServices}">
<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>
</ScrollViewer>
</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 GoBackCommand}"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
</UserControl>