diff options
Diffstat (limited to 'Gestor.Model/Model.Domain.Seguros/Consorcio.cs')
| -rw-r--r-- | Gestor.Model/Model.Domain.Seguros/Consorcio.cs | 191 |
1 files changed, 0 insertions, 191 deletions
diff --git a/Gestor.Model/Model.Domain.Seguros/Consorcio.cs b/Gestor.Model/Model.Domain.Seguros/Consorcio.cs deleted file mode 100644 index 3efd5ad..0000000 --- a/Gestor.Model/Model.Domain.Seguros/Consorcio.cs +++ /dev/null @@ -1,191 +0,0 @@ -using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Consorcio : DomainBase, IDomain
- {
- private string _bensConsorcio;
-
- private string _grupo;
-
- private string _cota;
-
- private decimal? _valorCredito;
-
- private string _observacao;
-
- public string BensConsorcio
- {
- get
- {
- string str = this._bensConsorcio;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._bensConsorcio = value;
- }
- }
-
- public string Cota
- {
- get
- {
- string str = this._cota;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cota = value;
- }
- }
-
- public string Grupo
- {
- get
- {
- string str = this._grupo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._grupo = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Consorcio consorcio = this;
- return new Func<List<KeyValuePair<string, string>>>(consorcio.Validate);
- }
- }
-
- public decimal? ValorCredito
- {
- get
- {
- return this._valorCredito;
- }
- set
- {
- this._valorCredito = value;
- }
- }
-
- public Consorcio()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- decimal valueOrDefault;
- string str;
- 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(item.Consorcio.BensConsorcio) ? "" : item.Consorcio.BensConsorcio), ""),
- new Tuple<string, string, string>("GRUPO", (string.IsNullOrWhiteSpace(item.Consorcio.Grupo) ? "" : item.Consorcio.Grupo), ""),
- new Tuple<string, string, string>("COTA", (string.IsNullOrWhiteSpace(item.Consorcio.Cota) ? "" : item.Consorcio.Cota), "")
- };
- decimal? valorCredito = item.Consorcio.ValorCredito;
- if (!valorCredito.HasValue)
- {
- str = "";
- }
- else
- {
- valorCredito = item.Consorcio.ValorCredito;
- if (valorCredito.HasValue)
- {
- valueOrDefault = valorCredito.GetValueOrDefault();
- str = valueOrDefault.ToString("C", new CultureInfo("pt-BR", false));
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("GRUPO", str, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- valueOrDefault = cobertura.Premio;
- observableCollection1.Add(new Tuple<string, string, string>(" PRÊMIO", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valueOrDefault = cobertura.Franquia;
- observableCollection1.Add(new Tuple<string, string, string>(" FRANQUIA", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valueOrDefault = cobertura.Lmi;
- observableCollection1.Add(new Tuple<string, string, string>(" L.M.I.", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.BensConsorcio))
- {
- keyValuePairs.AddValue<string, string>("BensConsorcio", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-}
\ No newline at end of file |