Merge pull request 'C#/uml-classes' (#12) from C#/uml-classes into master
continuous-integration/drone/push Build is passing Details

Reviewed-on: #12
pull/13/head^2
Antoine PEREDERII 2 years ago
commit dd5ecd8837

File diff suppressed because it is too large Load Diff

@ -1,7 +1,11 @@
namespace Banquale; using Banquale.Model;
namespace Banquale;
public partial class App : Application public partial class App : Application
{ {
public Manager MyManager { get; private set; } = new Manager();
public App() public App()
{ {
InitializeComponent(); InitializeComponent();

@ -46,7 +46,6 @@
</Tab> </Tab>
</TabBar> </TabBar>
</Shell> </Shell>

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
public class Client: Personne
{
public Client(string nom, string prenom, string mdp) : base(nom, prenom, mdp)
{
}
public List<Compte> ListeComptes{ get; private set; }
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
public class Compte
{
public int Solde { get; set; }
public string Nom { get; set;}
public string IBAN { get; set; }
public List<Transactions> CompteList { get; set; }
}
}

@ -0,0 +1,20 @@
using System;
namespace Banquale.Model
{
public class Manager
{
public List<Client> ListeClients { get; private set;}
public Manager() {
ListeClients = new List<Client>();
}
public bool AjouterClient(Client MonClient)
{
ListeClients.Add(MonClient);
return true;
}
}
}

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
public class Personne
{
public string Nom { get; private set; }
public string Prenom { get; private set; }
public int Id { get; private set; }
public string Mdp { get; private set; }
public Personne(string nom, string prenom, string mdp)
{
Nom = nom;
Prenom = prenom;
Id = 0;
Mdp = mdp;
}
}
}

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Banquale.Model
{
public class Transactions
{
public int Type { get; private set; }
public int Somme { get; private set; }
public Compte CompteImplique { get; private set; }
public string Categorie { get; private set; }
private Transactions( int type, int somme, Compte compteImplique, string categorie) {
Type = type;
Somme = somme;
CompteImplique = compteImplique;
Categorie = categorie;
}
}
}

@ -0,0 +1,11 @@
using Banquale.Model;
namespace Banquale.Views;
public partial class BalancePage : ContentPage
{
public BalancePage()
{
InitializeComponent();
}
}

@ -0,0 +1,16 @@
<?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="Banquale.Views.NewPage1"
Title="NewPage1">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Button
Text="Click me"
Clicked="Button_Clicked"/>
</VerticalStackLayout>
</ContentPage>

@ -0,0 +1,21 @@
using Banquale.Model;
namespace Banquale.Views;
public partial class NewPage1 : ContentPage
{
public Manager myManager => (App.Current as App).MyManager;
public NewPage1()
{
InitializeComponent();
}
int cpt = 0;
void Button_Clicked(System.Object sender, System.EventArgs e)
{
myManager.AjouterClient(new Client("Monsieur", "Bonjour", "HelloThisIsMyPassword"));
cpt++;
Console.WriteLine(cpt);
}
}
Loading…
Cancel
Save