Modification de la gestion des adresses

This commit is contained in:
2020-12-03 23:49:45 +01:00
parent b56f785e3d
commit c92d04fabf
11 changed files with 39 additions and 90 deletions

View File

@ -18,11 +18,9 @@ namespace Hermes.Model {
private string _tel;
private string _telPort;
private string _quartier;
private string _adresseNumero;
private string _adresseRue;
private string _adresse;
private string _adresseBatiment;
private string _adresseExtNumero;
private string _adresseExtRue;
private string _adresseExt;
private string _adresseExtCP;
private string _adresseExtVille;
private DateTime _dateCreation;
@ -79,8 +77,7 @@ namespace Hermes.Model {
set {
_typeResidence = value;
if(_typeResidence == false) {
AdresseExtNumero = null;
AdresseExtRue = null;
AdresseExt = null;
AdresseExtCP = null;
AdresseExtVille = null;
}
@ -116,17 +113,10 @@ namespace Hermes.Model {
OnPropertyChanged();
}
}
public string AdresseNumero {
get => _adresseNumero;
public string Adresse {
get => _adresse;
set {
_adresseNumero = value;
OnPropertyChanged();
}
}
public string AdresseRue {
get => _adresseRue;
set {
_adresseRue = value;
_adresse = value;
OnPropertyChanged();
}
}
@ -137,17 +127,10 @@ namespace Hermes.Model {
OnPropertyChanged();
}
}
public string AdresseExtNumero {
get => TypeResidence == false ? null : _adresseExtNumero;
public string AdresseExt {
get => TypeResidence == false ? null : _adresseExt;
set {
_adresseExtNumero = value;
OnPropertyChanged();
}
}
public string AdresseExtRue {
get => TypeResidence == false ? null : _adresseExtRue;
set {
_adresseExtRue = value;
_adresseExt = value;
OnPropertyChanged();
}
}
@ -240,11 +223,9 @@ namespace Hermes.Model {
citoyen.Tel = Tel;
citoyen.TelPort = TelPort;
citoyen.Quartier = Quartier;
citoyen.AdresseNumero = AdresseNumero;
citoyen.AdresseRue = AdresseRue;
citoyen.Adresse = Adresse;
citoyen.AdresseBatiment = AdresseBatiment;
citoyen.AdresseExtNumero = AdresseExtNumero;
citoyen.AdresseExtRue = AdresseExtRue;
citoyen.AdresseExt = AdresseExt;
citoyen.AdresseExtCP = AdresseExtCP;
citoyen.AdresseExtVille = AdresseExtVille;
citoyen.DateCreation = DateCreation;