|
|
@ -1,14 +1,16 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Model
|
|
|
|
namespace Model
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class Operation
|
|
|
|
public class Operation
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public string Nom { get; private set; }
|
|
|
|
/* public string Nom { get; private set; }
|
|
|
|
public string Type { get; private set; }
|
|
|
|
public string Type { get; private set; }
|
|
|
|
public string Tag { get; private set; }
|
|
|
|
public string Tag { get; private set; }
|
|
|
|
public double Montant { get; private set; }
|
|
|
|
public double Montant { get; private set; }
|
|
|
@ -22,9 +24,50 @@ namespace Model
|
|
|
|
Tag = tag;
|
|
|
|
Tag = tag;
|
|
|
|
Date = DateTime.Now.ToString("dd/MM/yyyy");
|
|
|
|
Date = DateTime.Now.ToString("dd/MM/yyyy");
|
|
|
|
Montant = montant;
|
|
|
|
Montant = montant;
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
|
|
|
|
public string IntituleOperation
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
get => intituleOperation;
|
|
|
|
|
|
|
|
set
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (intituleOperation != value)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
intituleOperation = value;
|
|
|
|
|
|
|
|
OnPropertyChanged(nameof(IntituleOperation));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private string intituleOperation;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public double Montant { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DateTime DateOperation { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public MethodePayement ModePayement { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsDebit { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public TagOperation Tag { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[JsonConstructor]
|
|
|
|
|
|
|
|
public Operation(string intituleOperation, double montant, DateTime dateOperation, MethodePayement modePayement, TagOperation tag, bool isDebit = true)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
IntituleOperation = intituleOperation;
|
|
|
|
|
|
|
|
Montant = montant;
|
|
|
|
|
|
|
|
DateOperation = dateOperation;
|
|
|
|
|
|
|
|
ModePayement = modePayement;
|
|
|
|
|
|
|
|
IsDebit = isDebit;
|
|
|
|
|
|
|
|
Tag = tag;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override string ToString()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return IntituleOperation + " " + DateOperation + " " + Montant + " " + ModePayement + " " + IsDebit;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|