parent
5821c8c1d0
commit
e1c68f442f
@ -1,13 +1,20 @@
|
|||||||
using Model;
|
using Model;
|
||||||
|
|
||||||
namespace Banquale.Views.Category;
|
namespace Banquale.Views.Category
|
||||||
|
|
||||||
public partial class CategoryPage : ContentPage
|
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Page de catégorie.
|
||||||
|
/// </summary>
|
||||||
|
public partial class CategoryPage : ContentPage
|
||||||
|
{
|
||||||
public Manager Mgr => (App.Current as App).MyManager;
|
public Manager Mgr => (App.Current as App).MyManager;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructeur de la page CategoryPage.
|
||||||
|
/// </summary>
|
||||||
public CategoryPage()
|
public CategoryPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,26 +1,36 @@
|
|||||||
using Model;
|
using Model;
|
||||||
|
|
||||||
namespace Banquale.Views.Category;
|
namespace Banquale.Views.Category
|
||||||
|
|
||||||
public partial class CategoryView : ContentView
|
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Vue partielle pour afficher les différentes catégories.
|
||||||
|
/// </summary>
|
||||||
|
public partial class CategoryView : ContentView
|
||||||
|
{
|
||||||
public Manager Mgr => (App.Current as App).MyManager;
|
public Manager Mgr => (App.Current as App).MyManager;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructeur de la vue CategoryView.
|
||||||
|
/// </summary>
|
||||||
public CategoryView()
|
public CategoryView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
BindingContext = Mgr;
|
BindingContext = Mgr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gère l'événement de clic sur une catégorie.
|
||||||
|
/// </summary>
|
||||||
public async void Category_Clicked(object sender, EventArgs e)
|
public async void Category_Clicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var selectedItem = (sender as Grid)?.BindingContext as string;
|
var selectedItem = (sender as Grid)?.BindingContext as string;
|
||||||
|
|
||||||
if (selectedItem != null)
|
if (selectedItem != null)
|
||||||
{
|
{
|
||||||
Mgr.SelectedTransaction.ChangeCategory(selectedItem);
|
Mgr.SelectedTransaction.ChangeCategory(selectedItem);
|
||||||
Mgr.Persistence.DataSave(Mgr.CustomersList, Mgr.Consultant);
|
Mgr.Persistence.DataSave(Mgr.CustomersList, Mgr.Consultant);
|
||||||
await Shell.Current.Navigation.PopAsync();
|
await Shell.Current.Navigation.PopAsync();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,33 +1,48 @@
|
|||||||
namespace Banquale.Views;
|
namespace Banquale.Views
|
||||||
|
|
||||||
public partial class ConsultantHomePage : ContentPage
|
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Page d'accueil du consultant.
|
||||||
|
/// </summary>
|
||||||
|
public partial class ConsultantHomePage : ContentPage
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initialise une nouvelle instance de la classe ConsultantHomePage.
|
||||||
|
/// </summary>
|
||||||
public ConsultantHomePage()
|
public ConsultantHomePage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gère l'événement du bouton de déconnexion.
|
||||||
|
/// </summary>
|
||||||
async void DisconnectionClicked(System.Object sender, System.EventArgs e)
|
async void DisconnectionClicked(System.Object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
await Shell.Current.GoToAsync("///connection");
|
await Shell.Current.GoToAsync("///connection");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gère l'événement du bouton d'identification du client.
|
||||||
|
/// </summary>
|
||||||
async void Id_Clicked(System.Object sender, System.EventArgs e)
|
async void Id_Clicked(System.Object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
await Shell.Current.Navigation.PushAsync(new ConsultantIdPage());
|
await Shell.Current.Navigation.PushAsync(new ConsultantIdPage());
|
||||||
//await Shell.Current.GoToAsync("..");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gère l'événement du bouton de création de client.
|
||||||
|
/// </summary>
|
||||||
async void Create_Customer_Clicked(System.Object sender, System.EventArgs e)
|
async void Create_Customer_Clicked(System.Object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
await Shell.Current.Navigation.PushAsync(new CreateCustomerPage());
|
await Shell.Current.Navigation.PushAsync(new CreateCustomerPage());
|
||||||
//await Shell.Current.GoToAsync("///createcustomer");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gère l'événement du bouton de messagerie.
|
||||||
|
/// </summary>
|
||||||
async void Message_Clicked(System.Object sender, System.EventArgs e)
|
async void Message_Clicked(System.Object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
await Shell.Current.Navigation.PushAsync(new MessageListPage());
|
await Shell.Current.Navigation.PushAsync(new MessageListPage());
|
||||||
//await Shell.Current.GoToAsync("///createcustomer");
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in new issue