You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
2.3 KiB
99 lines
2.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.IO.Pipes;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Model
|
|
{
|
|
public class Entite : INotifyPropertyChanged
|
|
{
|
|
public event PropertyChangedEventHandler? PropertyChanged;
|
|
|
|
public string Nom
|
|
{
|
|
get => nom;
|
|
set
|
|
{
|
|
if (nom == value)
|
|
return;
|
|
nom = value;
|
|
OnPropertyChanged(nameof(Nom));
|
|
}
|
|
}
|
|
private string nom;
|
|
|
|
public string Adresse
|
|
{
|
|
get => adresse;
|
|
set
|
|
{
|
|
if (adresse == value)
|
|
return;
|
|
adresse = value;
|
|
OnPropertyChanged(nameof(Adresse));
|
|
}
|
|
}
|
|
private string adresse;
|
|
|
|
public int? CodePostal
|
|
{
|
|
get => codePostal;
|
|
set
|
|
{
|
|
if (codePostal == value)
|
|
return;
|
|
codePostal = value;
|
|
OnPropertyChanged(nameof(CodePostal));
|
|
}
|
|
}
|
|
private int? codePostal;
|
|
|
|
public string Ville
|
|
{
|
|
get => ville;
|
|
set
|
|
{
|
|
if (ville == value)
|
|
return;
|
|
ville = value;
|
|
OnPropertyChanged(nameof(Ville));
|
|
}
|
|
}
|
|
private string ville;
|
|
|
|
public int? NumTel
|
|
{
|
|
get => numTel;
|
|
set
|
|
{
|
|
if(numTel == value)
|
|
return;
|
|
numTel = value;
|
|
OnPropertyChanged(nameof(NumTel));
|
|
}
|
|
}
|
|
private int? numTel;
|
|
|
|
public Entite(string nom = "", string adresse = "", int? codePostal = null, string ville = "", int? numTel = null)
|
|
{
|
|
Nom = nom;
|
|
Adresse = adresse;
|
|
CodePostal = codePostal;
|
|
Ville = ville;
|
|
NumTel = numTel;
|
|
}
|
|
|
|
void OnPropertyChanged(string propertyName)
|
|
{
|
|
if (PropertyChanged != null)
|
|
{
|
|
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
|
}
|
|
}
|
|
}
|
|
}
|