diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
| commit | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch) | |
| tree | e1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Codemerx/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Codemerx/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs')
| -rw-r--r-- | Codemerx/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs | 250 |
1 files changed, 250 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs b/Codemerx/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs new file mode 100644 index 0000000..c03bd40 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs @@ -0,0 +1,250 @@ +using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Helper;
+using Gestor.Model.Resources;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Threading;
+
+namespace Gestor.Model.Domain.Seguros
+{
+ public class DetalheExtrato : DomainBase, IDomain, INotifyPropertyChanged
+ {
+ private bool _selecionado;
+
+ private string _cliente;
+
+ private string _apolice;
+
+ private string _endosso;
+
+ private string _numeroParcela;
+
+ private string _historico;
+
+ public bool IsNormal = true;
+
+ public string Apolice
+ {
+ get
+ {
+ string str = this._apolice;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._apolice = value;
+ }
+ }
+
+ public string Cliente
+ {
+ get
+ {
+ string str = this._cliente;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._cliente = value;
+ }
+ }
+
+ public decimal? Comissao
+ {
+ get;
+ set;
+ }
+
+ public bool Corrigir
+ {
+ get;
+ set;
+ }
+
+ public DateTime? Credito
+ {
+ get;
+ set;
+ }
+
+ public long? Documento
+ {
+ get;
+ set;
+ }
+
+ public string Endosso
+ {
+ get
+ {
+ string str = this._endosso;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._endosso = value;
+ }
+ }
+
+ public Gestor.Model.Domain.Seguros.Extrato Extrato
+ {
+ get;
+ set;
+ }
+
+ public string Historico
+ {
+ get
+ {
+ string str = this._historico;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._historico = value;
+ }
+ }
+
+ public string NumeroParcela
+ {
+ get
+ {
+ string str = this._numeroParcela;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._numeroParcela = value;
+ }
+ }
+
+ public long? Parcela
+ {
+ get;
+ set;
+ }
+
+ public DateTime? Recebimento
+ {
+ get;
+ set;
+ }
+
+ public bool Selecionado
+ {
+ get
+ {
+ return this._selecionado;
+ }
+ set
+ {
+ this._selecionado = value;
+ this.OnPropertyChanged("Selecionado");
+ }
+ }
+
+ public StatusParcela? Status
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Common.SubTipo? SubTipo
+ {
+ get;
+ set;
+ }
+
+ [JsonIgnore]
+ public Func<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ DetalheExtrato detalheExtrato = this;
+ return new Func<List<KeyValuePair<string, string>>>(detalheExtrato.Validate);
+ }
+ }
+
+ public decimal? Valor
+ {
+ get;
+ set;
+ }
+
+ public decimal? ValorComissao
+ {
+ get;
+ set;
+ }
+
+ public DetalheExtrato()
+ {
+ }
+
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
+ if (propertyChangedEventHandler == null)
+ {
+ return;
+ }
+ propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (this.Recebimento.HasValue && (DateTime.Compare(this.Recebimento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Recebimento.Value, new DateTime(9999, 12, 31)) > 0))
+ {
+ keyValuePairs.AddValue<string, string>("Recebimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
+ }
+ if (this.Credito.HasValue && (DateTime.Compare(this.Credito.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Credito.Value, new DateTime(9999, 12, 31)) > 0))
+ {
+ keyValuePairs.AddValue<string, string>("Credito", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Cliente) && this.Cliente.Length > 100)
+ {
+ keyValuePairs.AddValue<string, string>("Cliente", string.Format(Messages.MaiorQueLimite, 100), true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Apolice) && this.Apolice.Length > 30)
+ {
+ keyValuePairs.AddValue<string, string>("Apolice", string.Format(Messages.MaiorQueLimite, 30), true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Endosso) && this.Endosso.Length > 20)
+ {
+ keyValuePairs.AddValue<string, string>("Endosso", string.Format(Messages.MaiorQueLimite, 20), true);
+ }
+ if (string.IsNullOrWhiteSpace(this.NumeroParcela) && this.NumeroParcela.Length > 4)
+ {
+ keyValuePairs.AddValue<string, string>("NumeroParcela", string.Format(Messages.MaiorQueLimite, 4), true);
+ }
+ return keyValuePairs;
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+ }
+}
\ No newline at end of file |