Finalisation de la fonction de filtrage
This commit is contained in:
@@ -28,7 +28,9 @@ namespace Hermes.Model {
|
||||
private DateTime _dateCreation;
|
||||
private DateTime _dateModification;
|
||||
|
||||
public int Id { get => _id; set => _id = value; }
|
||||
public int Id {
|
||||
get => _id; set => _id = value;
|
||||
}
|
||||
public string Civilite {
|
||||
get => _civilite;
|
||||
set {
|
||||
@@ -179,7 +181,9 @@ namespace Hermes.Model {
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string TypeResidenceLabel { get => TypeResidence == false ? "Principale" : "Secondaire"; }
|
||||
public string TypeResidenceLabel {
|
||||
get => TypeResidence == false ? "Principale" : "Secondaire";
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string Age {
|
||||
@@ -196,11 +200,21 @@ namespace Hermes.Model {
|
||||
} else {
|
||||
try {
|
||||
DateNaissance = new DateTime(DateTime.Now.Year - Int32.Parse(value), 1, 1);
|
||||
} catch(Exception) {}
|
||||
} catch(Exception) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public int? AgeInt {
|
||||
get {
|
||||
if(DateNaissance.HasValue) {
|
||||
return DateTime.Now.Year - DateNaissance.Value.Year;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string AdresseCP => ModelContext.Getinstance().Preferences.Local[0].VilleCP;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user