|
|
@@ -6,6 +6,10 @@ namespace Domain.XML_Model
|
|
|
[XmlRoot(ElementName = "pouvoirs")]
|
|
|
public class Pouvoir : BaseEntity
|
|
|
{
|
|
|
+ [XmlIgnore]
|
|
|
+ private string? _opposeAsAString;
|
|
|
+ [XmlIgnore]
|
|
|
+ private string? _prolongeableAsAString;
|
|
|
|
|
|
[XmlAttribute(AttributeName = "id")]
|
|
|
public string Id { get; set; }
|
|
|
@@ -22,15 +26,49 @@ namespace Domain.XML_Model
|
|
|
[XmlAttribute(AttributeName = "action")]
|
|
|
public string? Action { get; set; }
|
|
|
|
|
|
- [XmlAttribute(AttributeName = "opposé")]
|
|
|
+ [XmlIgnore]
|
|
|
public bool Opposé { get; set; }
|
|
|
|
|
|
+ [XmlAttribute(AttributeName = "opposé")]
|
|
|
+ public string? OpposeAsAString
|
|
|
+ {
|
|
|
+ get => _opposeAsAString;
|
|
|
+ set
|
|
|
+ {
|
|
|
+ //this.BadBoolField = Convert.ToBoolean(value);
|
|
|
+ if (!value.Equals("True") && !value.Equals("true"))
|
|
|
+ {
|
|
|
+ if (value.Equals("False") || value.Equals("false"))
|
|
|
+ Opposé = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ Opposé = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
[XmlAttribute(AttributeName = "portée")]
|
|
|
public string? Portée { get; set; }
|
|
|
|
|
|
- [XmlAttribute(AttributeName = "prolongeable")]
|
|
|
+ [XmlIgnore]
|
|
|
public bool Prolongeable { get; set; }
|
|
|
|
|
|
+ [XmlAttribute(AttributeName = "prolongeable")]
|
|
|
+ public string? ProlongeableAsAString
|
|
|
+ {
|
|
|
+ get => _prolongeableAsAString;
|
|
|
+ set
|
|
|
+ {
|
|
|
+ //this.BadBoolField = Convert.ToBoolean(value);
|
|
|
+ if (!value.Equals("True") && !value.Equals("true"))
|
|
|
+ {
|
|
|
+ if (value.Equals("False") || value.Equals("false"))
|
|
|
+ Prolongeable = false;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ Prolongeable = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
[XmlAttribute(AttributeName = "description")]
|
|
|
public string? Description { get; set; }
|
|
|
[XmlIgnore] public int PouvoirId { get; set; }
|