diff options
Diffstat (limited to 'Gestor.Model/Model.Domain.Financeiro/BancosContas.cs')
| -rw-r--r-- | Gestor.Model/Model.Domain.Financeiro/BancosContas.cs | 195 |
1 files changed, 0 insertions, 195 deletions
diff --git a/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs b/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs deleted file mode 100644 index 06eade3..0000000 --- a/Gestor.Model/Model.Domain.Financeiro/BancosContas.cs +++ /dev/null @@ -1,195 +0,0 @@ -using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Domain.Seguros;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Financeiro
-{
- public class BancosContas : DomainBase, IDomain
- {
- private string _descricao;
-
- private string _agencia;
-
- private string _conta;
-
- private string _observacao;
-
- [Description("AGÊNCIA")]
- [Log(true)]
- public string Agencia
- {
- get
- {
- string str = this._agencia;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._agencia = value;
- }
- }
-
- [Log(true)]
- public bool Ativo
- {
- get;
- set;
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Common.Banco Banco
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Conta
- {
- get
- {
- string str = this._conta;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._conta = value;
- }
- }
-
- [Description("DESCRIÇÃO")]
- [Log(true)]
- [Name(true)]
- public string Descricao
- {
- get
- {
- string str = this._descricao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._descricao = value;
- }
- }
-
- public long IdEmpresa { get; set; } = (long)1;
-
- [Description("OBSERVAÇÃO")]
- [Log(true)]
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public bool Selecionado
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- BancosContas bancosConta = this;
- return new Func<List<KeyValuePair<string, string>>>(bancosConta.Validate);
- }
- }
-
- public BancosContas()
- {
- }
-
- public List<TupleList> Log()
- {
- string nome;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("DESCRIÇÃO", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), ""),
- new Tuple<string, string, string>("AGÊNCIA", (string.IsNullOrWhiteSpace(this.Agencia) ? "" : this.Agencia), "")
- };
- if (this.Banco == null)
- {
- nome = "";
- }
- else
- {
- Gestor.Model.Domain.Common.Banco banco = this.Banco;
- if (banco != null)
- {
- nome = banco.Nome;
- }
- else
- {
- nome = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("BANCO", nome, ""));
- observableCollection.Add(new Tuple<string, string, string>("CONTA CORRENTE/POUPANÇA", (string.IsNullOrWhiteSpace(this.Conta) ? "" : this.Conta), ""));
- observableCollection.Add(new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), ""));
- observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = new List<KeyValuePair<string, string>>();
- if (string.IsNullOrWhiteSpace(this.Descricao))
- {
- keyValuePairs.AddValue<string, string>("Descricao|DESCRIÇÃO", Messages.Obrigatorio, true);
- }
- if (this.Banco == null)
- {
- keyValuePairs.AddValue<string, string>("Banco", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Agencia))
- {
- keyValuePairs.AddValue<string, string>("Agencia|AGÊNCIA", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Conta))
- {
- keyValuePairs.AddValue<string, string>("Conta", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-}
\ No newline at end of file |