summaryrefslogtreecommitdiff
path: root/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs')
-rw-r--r--Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs250
1 files changed, 0 insertions, 250 deletions
diff --git a/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs b/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs
deleted file mode 100644
index c03bd40..0000000
--- a/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs
+++ /dev/null
@@ -1,250 +0,0 @@
-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