| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <?xml version="1.0" encoding="utf-8" ?>
- <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- x:Class="practiceApplicaiton.ReportPage"
- Title="Отчёт по бронированиям">
- <Grid RowDefinitions="Auto,*,Auto" Padding="16" RowSpacing="10">
- <!-- Фильтр дат -->
- <Frame Grid.Row="0" BackgroundColor="White" CornerRadius="10"
- Padding="16" BorderColor="#E0E0E0">
- <Grid ColumnDefinitions="*,*,Auto" ColumnSpacing="10">
- <VerticalStackLayout Grid.Column="0">
- <Label Text="С" FontAttributes="Bold" TextColor="#2E4057"/>
- <DatePicker x:Name="DateFrom" BackgroundColor="Gray" TextColor="#4472C4"/>
- </VerticalStackLayout>
- <VerticalStackLayout Grid.Column="1">
- <Label Text="По" FontAttributes="Bold" TextColor="#2E4057"/>
- <DatePicker x:Name="DateTo" BackgroundColor="Gray" TextColor="#4472C4"/>
- </VerticalStackLayout>
- <Button Grid.Column="2" Text="Показать"
- BackgroundColor="#4472C4" TextColor="White"
- CornerRadius="8" VerticalOptions="End"
- Clicked="OnGenerateClicked"/>
- </Grid>
- </Frame>
- <!-- Список -->
- <CollectionView Grid.Row="1" x:Name="ReportList">
- <CollectionView.Header>
- <Grid ColumnDefinitions="*,80,80,100" Padding="8,4"
- BackgroundColor="#2E4057">
- <Label Grid.Column="0" Text="Клиент / Комната"
- TextColor="#4472C4" FontAttributes="Bold"/>
- <Label Grid.Column="1" Text="Заезд"
- TextColor="#4472C4" FontAttributes="Bold" HorizontalOptions="Center"/>
- <Label Grid.Column="2" Text="Ночей"
- TextColor="#4472C4" FontAttributes="Bold" HorizontalOptions="Center"/>
- <Label Grid.Column="3" Text="Итого"
- TextColor="#4472C4" FontAttributes="Bold" HorizontalOptions="End"/>
- </Grid>
- </CollectionView.Header>
- <CollectionView.ItemTemplate>
- <DataTemplate>
- <Grid ColumnDefinitions="*,80,80,100" Padding="8,6"
- BackgroundColor="White">
- <VerticalStackLayout Grid.Column="0">
- <Label Text="{Binding ClientFullName}" FontAttributes="Bold" FontSize="13" TextColor="#4472C4"/>
- <Label TextColor="#777" FontSize="12">
- <Label.FormattedText>
- <FormattedString>
- <Span Text="Ком. " TextColor="#4472C4"/>
- <Span Text="{Binding RoomNumber}" TextColor="#4472C4"/>
- <Span Text=" · " TextColor="#4472C4"/>
- <Span Text="{Binding RoomType}" TextColor="#4472C4"/>
- </FormattedString>
- </Label.FormattedText>
- </Label>
- </VerticalStackLayout>
- <Label Grid.Column="1"
- Text="{Binding CheckInDate, StringFormat='{0:dd.MM}'}"
- HorizontalOptions="Center" VerticalOptions="Center" TextColor="#4472C4"/>
- <Label Grid.Column="2"
- Text="{Binding Nights}" TextColor="#4472C4"
- HorizontalOptions="Center" VerticalOptions="Center"/>
- <Label Grid.Column="3"
- Text="{Binding TotalCost, StringFormat='{0:N0} ₽'}"
- FontAttributes="Bold" TextColor="#2E4057"
- HorizontalOptions="End" VerticalOptions="Center"/>
- </Grid>
- </DataTemplate>
- </CollectionView.ItemTemplate>
- </CollectionView>
- <!-- Итог -->
- <Frame Grid.Row="2" BackgroundColor="#2E4057" CornerRadius="10" Padding="16">
- <Grid ColumnDefinitions="*,Auto">
- <Label Text="Итого за период:" TextColor="#E0E0E0"
- FontAttributes="Bold" FontSize="16"/>
- <Label Grid.Column="1" x:Name="TotalLabel"
- Text="0 ₽" TextColor="#FFF2CC"
- FontAttributes="Bold" FontSize="18"/>
- </Grid>
- </Frame>
- </Grid>
- </ContentPage>
|