Compare commits
2 Commits
53ebad6fe5
...
460b12f066
Author | SHA1 | Date | |
---|---|---|---|
460b12f066 | |||
![]() |
1d09ec3979 |
@ -4,15 +4,44 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="HegreHotel.Views.Chambre.ModifierChambrePage"
|
x:Class="HegreHotel.Views.Chambre.ModifierChambrePage"
|
||||||
Title="Modifier la Chambre">
|
Title="Modifier la Chambre">
|
||||||
<StackLayout Padding="10">
|
|
||||||
<Entry x:Name="EntryNom" Placeholder="Nom de la chambre"/>
|
<ScrollView>
|
||||||
<Entry x:Name="EntryDescription" Placeholder="Description"/>
|
<VerticalStackLayout Padding="20" Spacing="15">
|
||||||
<Entry x:Name="EntryTarif" Placeholder="Tarif" Keyboard="Numeric"/>
|
|
||||||
<Entry x:Name="EntryNbPersonne" Placeholder="Nombre de personnes" Keyboard="Numeric"/>
|
<!-- Champ Nom -->
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
<Label Text="Modifier le Statut" Margin="10,0,0,0"/>
|
<Entry x:Name="EntryNom" Placeholder="Nom de la chambre"/>
|
||||||
<Picker x:Name="PickerStatut" Title=""/>
|
</Frame>
|
||||||
|
|
||||||
<Button Text="Enregistrer les modifications" Clicked="OnEnregistrerClicked" Margin="0,20"/>
|
<!-- Champ Description -->
|
||||||
</StackLayout>
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
|
<Editor x:Name="EntryDescription" Placeholder="Description" AutoSize="TextChanges"/>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<!-- Champ Tarif -->
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
|
<Entry x:Name="EntryTarif" Placeholder="Tarif (€)" Keyboard="Numeric"/>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<!-- Champ Nombre de personnes -->
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
|
<Entry x:Name="EntryNbPersonne" Placeholder="Nombre de personnes" Keyboard="Numeric"/>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<Label Text="Modifier le Statut" Margin="10,0,0,0"/>
|
||||||
|
<Picker x:Name="PickerStatut" Title=""/>
|
||||||
|
|
||||||
|
<!-- Bouton Enregistrer -->
|
||||||
|
<Button Text="Enregistrer les modifications"
|
||||||
|
Clicked="OnEnregistrerClicked"
|
||||||
|
BackgroundColor="#007AFF"
|
||||||
|
TextColor="White"
|
||||||
|
CornerRadius="10"
|
||||||
|
Padding="12"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
@ -4,44 +4,58 @@
|
|||||||
x:Class="HegreHotel.Views.Client.ClientsPage"
|
x:Class="HegreHotel.Views.Client.ClientsPage"
|
||||||
Title="Gestion des Clients"
|
Title="Gestion des Clients"
|
||||||
Appearing="ClientsPage_OnAppearing">
|
Appearing="ClientsPage_OnAppearing">
|
||||||
<StackLayout Padding="10">
|
|
||||||
|
<StackLayout Padding="15" Spacing="10">
|
||||||
|
|
||||||
|
<!-- Bouton Ajouter Client -->
|
||||||
<Button Text="Ajouter Client"
|
<Button Text="Ajouter Client"
|
||||||
Clicked="OnAjouterClientClicked"
|
Clicked="OnAjouterClientClicked"
|
||||||
HorizontalOptions="Center"
|
HorizontalOptions="Center"
|
||||||
Margin="0,10"/>
|
BackgroundColor="#007AFF"
|
||||||
|
TextColor="White"
|
||||||
|
CornerRadius="10"
|
||||||
|
Padding="10"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
WidthRequest="200"/>
|
||||||
|
|
||||||
|
<!-- Liste des clients -->
|
||||||
<ListView x:Name="ClientsListView" HasUnevenRows="True" ItemTapped="OnClientTapped">
|
<ListView x:Name="ClientsListView" HasUnevenRows="True" ItemTapped="OnClientTapped">
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<ViewCell>
|
<ViewCell>
|
||||||
<StackLayout Orientation="Horizontal" Padding="5" Spacing="10">
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB" Margin="0,5">
|
||||||
<Label Text="{Binding Nom}"
|
<StackLayout Orientation="Horizontal" Spacing="15">
|
||||||
VerticalOptions="Center"
|
<!-- Icône ou Avatar -->
|
||||||
FontAttributes="Bold"
|
<Image Source="user_icon.png" WidthRequest="40" HeightRequest="40"/>
|
||||||
WidthRequest="100"/>
|
|
||||||
<Label Text="{Binding Prenom}"
|
<!-- Infos du client -->
|
||||||
VerticalOptions="Center"
|
<VerticalStackLayout>
|
||||||
WidthRequest="100"/>
|
<Label Text="{Binding Nom}" FontAttributes="Bold" FontSize="16"/>
|
||||||
<StackLayout Orientation="Horizontal" HorizontalOptions="EndAndExpand" Spacing="5">
|
<Label Text="{Binding Prenom}" FontSize="14" TextColor="Gray"/>
|
||||||
<ImageButton Source="edit_icon.png"
|
</VerticalStackLayout>
|
||||||
Clicked="OnModifierClientClicked"
|
|
||||||
CommandParameter="{Binding .}"
|
<!-- Actions Modifier / Supprimer -->
|
||||||
HeightRequest="30"
|
<StackLayout Orientation="Horizontal" HorizontalOptions="EndAndExpand" Spacing="5">
|
||||||
WidthRequest="30"
|
<ImageButton Source="edit_icon.png"
|
||||||
BackgroundColor="Transparent"/>
|
Clicked="OnModifierClientClicked"
|
||||||
<ImageButton Source="delete_icon.png"
|
CommandParameter="{Binding .}"
|
||||||
Clicked="OnSupprimerClientClicked"
|
HeightRequest="30"
|
||||||
CommandParameter="{Binding .}"
|
WidthRequest="30"
|
||||||
HeightRequest="30"
|
BackgroundColor="Transparent"/>
|
||||||
WidthRequest="30"
|
<ImageButton Source="delete_icon.png"
|
||||||
BackgroundColor="Transparent"/>
|
Clicked="OnSupprimerClientClicked"
|
||||||
|
CommandParameter="{Binding .}"
|
||||||
|
HeightRequest="30"
|
||||||
|
WidthRequest="30"
|
||||||
|
BackgroundColor="Transparent"/>
|
||||||
|
</StackLayout>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</StackLayout>
|
</Frame>
|
||||||
</ViewCell>
|
</ViewCell>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|
||||||
|
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
@ -15,7 +15,7 @@ namespace HegreHotel.Views.Client
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
LoadClients();
|
LoadClients();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LoadClients()
|
private async void LoadClients()
|
||||||
{
|
{
|
||||||
string dbPath = Path.Combine(FileSystem.AppDataDirectory, "HegreHotel.db3");
|
string dbPath = Path.Combine(FileSystem.AppDataDirectory, "HegreHotel.db3");
|
||||||
|
@ -1,35 +1,59 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="HegreHotel.Views.Client.DetailsClientPage">
|
x:Class="HegreHotel.Views.Client.DetailsClientPage"
|
||||||
<ContentPage.Content>
|
Title="Détails du Client">
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<StackLayout Padding="10" Spacing="5">
|
<VerticalStackLayout Padding="20" Spacing="15">
|
||||||
<HorizontalStackLayout Spacing="5">
|
|
||||||
<Label Text="{Binding Nom}" FontAttributes="Bold" FontSize="18"/>
|
<!-- Nom et prénom -->
|
||||||
<Label Text="{Binding Prenom}" FontSize="18"/>
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="#F3F4F6">
|
||||||
|
<HorizontalStackLayout Spacing="10">
|
||||||
|
<Label Text="{Binding Nom}" FontAttributes="Bold" FontSize="22"/>
|
||||||
|
<Label Text="{Binding Prenom}" FontSize="22"/>
|
||||||
</HorizontalStackLayout>
|
</HorizontalStackLayout>
|
||||||
<VerticalStackLayout>
|
</Frame>
|
||||||
<Label Text="{Binding Email}"/>
|
|
||||||
<Label Text="{Binding Telephone}"/>
|
<!-- Coordonnées -->
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="#F9FAFB">
|
||||||
|
<VerticalStackLayout Spacing="5">
|
||||||
|
<HorizontalStackLayout Spacing="10">
|
||||||
|
<Image Source="email_icon.png" WidthRequest="20" HeightRequest="20"/>
|
||||||
|
<Label Text="{Binding Email}" FontSize="16"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
<HorizontalStackLayout Spacing="10">
|
||||||
|
<Image Source="phone_icon.png" WidthRequest="20" HeightRequest="20"/>
|
||||||
|
<Label Text="{Binding Telephone}" FontSize="16"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
</VerticalStackLayout>
|
</VerticalStackLayout>
|
||||||
<Label Text="Historique des réservations :" FontAttributes="Bold" FontSize="Large"/>
|
</Frame>
|
||||||
<ListView x:Name="ListeReservations">
|
|
||||||
<ListView.ItemTemplate>
|
<!-- Historique des réservations -->
|
||||||
<DataTemplate>
|
<Label Text="Historique des réservations :" FontAttributes="Bold" FontSize="18" Margin="0,10,0,5"/>
|
||||||
<ViewCell>
|
<CollectionView x:Name="ListeReservations">
|
||||||
<StackLayout Orientation="Horizontal" Padding="5" Spacing="10">
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB" Margin="0,5">
|
||||||
|
<VerticalStackLayout Spacing="5">
|
||||||
|
<Label Text="{Binding ChambreNom}" FontAttributes="Bold" FontSize="16"/>
|
||||||
|
<HorizontalStackLayout Spacing="10">
|
||||||
|
<Label Text="Début :" FontAttributes="Bold"/>
|
||||||
<Label Text="{Binding DateDebut, StringFormat='{0:dd/MM/yyyy}'}"/>
|
<Label Text="{Binding DateDebut, StringFormat='{0:dd/MM/yyyy}'}"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
<HorizontalStackLayout Spacing="10">
|
||||||
|
<Label Text="Fin :" FontAttributes="Bold"/>
|
||||||
<Label Text="{Binding DateFin, StringFormat='{0:dd/MM/yyyy}'}"/>
|
<Label Text="{Binding DateFin, StringFormat='{0:dd/MM/yyyy}'}"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
<HorizontalStackLayout Spacing="10">
|
||||||
|
<Label Text="Invités :" FontAttributes="Bold"/>
|
||||||
<Label Text="{Binding NbInvite}"/>
|
<Label Text="{Binding NbInvite}"/>
|
||||||
<Label Text="{Binding ChambreNom}"/>
|
</HorizontalStackLayout>
|
||||||
</StackLayout>
|
</VerticalStackLayout>
|
||||||
</ViewCell>
|
</Frame>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</CollectionView.ItemTemplate>
|
||||||
</ListView>
|
</CollectionView>
|
||||||
</StackLayout>
|
|
||||||
</ScrollView>
|
</VerticalStackLayout>
|
||||||
</ContentPage.Content>
|
</ScrollView>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
@ -1,14 +1,47 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="HegreHotel.Views.Client.ModifierClientPage"
|
x:Class="HegreHotel.Views.Client.ModifierClientPage"
|
||||||
Title="Modifier le Client">
|
Title="Modifier le Client">
|
||||||
<StackLayout Padding="10">
|
|
||||||
<Entry x:Name="EntryNom" Placeholder="Nom du client"/>
|
<ScrollView>
|
||||||
<Entry x:Name="EntryPrenom" Placeholder="Prenom"/>
|
<VerticalStackLayout Padding="20" Spacing="15">
|
||||||
<Entry x:Name="EntryEmail" Placeholder="Email" />
|
|
||||||
<Entry x:Name="EntryTelephone" Placeholder="Téléphone" Keyboard="Numeric"/>
|
<!-- Champ Nom -->
|
||||||
<Button Text="Enregistrer" Clicked="OnEnregistrerClicked" Margin="0,20"/>
|
<Label Text="Nom du client" FontAttributes="Bold" FontSize="16"/>
|
||||||
</StackLayout>
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
</ContentPage>
|
<Entry x:Name="EntryNom" Placeholder="Entrez le nom du client"/>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<!-- Champ Prénom -->
|
||||||
|
<Label Text="Prénom" FontAttributes="Bold" FontSize="16"/>
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
|
<Entry x:Name="EntryPrenom" Placeholder="Entrez le prénom"/>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<!-- Champ Email -->
|
||||||
|
<Label Text="Email" FontAttributes="Bold" FontSize="16"/>
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
|
<Entry x:Name="EntryEmail" Placeholder="Entrez l'email" Keyboard="Email"/>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<!-- Champ Téléphone -->
|
||||||
|
<Label Text="Téléphone" FontAttributes="Bold" FontSize="16"/>
|
||||||
|
<Frame Padding="10" CornerRadius="10" BackgroundColor="White" BorderColor="#E5E7EB">
|
||||||
|
<Entry x:Name="EntryTelephone" Placeholder="Entrez le téléphone" Keyboard="Telephone"/>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
|
<!-- Bouton Enregistrer -->
|
||||||
|
<Button Text="Enregistrer les modifications"
|
||||||
|
Clicked="OnEnregistrerClicked"
|
||||||
|
BackgroundColor="#007AFF"
|
||||||
|
TextColor="White"
|
||||||
|
CornerRadius="10"
|
||||||
|
Padding="12"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
HorizontalOptions="Center"/>
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
</ContentPage>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user