From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- Gestor.Model/Model.Domain.Ferramentas/Agenda.cs | 178 ------------------------ 1 file changed, 178 deletions(-) delete mode 100644 Gestor.Model/Model.Domain.Ferramentas/Agenda.cs (limited to 'Gestor.Model/Model.Domain.Ferramentas/Agenda.cs') diff --git a/Gestor.Model/Model.Domain.Ferramentas/Agenda.cs b/Gestor.Model/Model.Domain.Ferramentas/Agenda.cs deleted file mode 100644 index 263f0bc..0000000 --- a/Gestor.Model/Model.Domain.Ferramentas/Agenda.cs +++ /dev/null @@ -1,178 +0,0 @@ -using Gestor.Model.Common; -using Gestor.Model.Domain.Generic; -using Gestor.Model.Domain.Seguros; -using Gestor.Model.Helper; -using Gestor.Model.Resources; -using Gestor.Model.Validation; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.CompilerServices; - -namespace Gestor.Model.Domain.Ferramentas -{ - public class Agenda : DomainBase, IDomain - { - public string Bairro - { - get; - set; - } - - public string Cep - { - get; - set; - } - - public string Cidade - { - get; - set; - } - - public string Complemento - { - get; - set; - } - - public ObservableCollection Emails - { - get; - set; - } - - public string Endereco - { - get; - set; - } - - public string Estado - { - get; - set; - } - - public string Nome - { - get; - set; - } - - public string Numero - { - get; - set; - } - - public string Observacao - { - get; - set; - } - - public ObservableCollection Telefones - { - get; - set; - } - - [JsonIgnore] - public Func>> ValidationEvent - { - get - { - Agenda agenda = this; - return new Func>>(agenda.Validate); - } - } - - public Agenda() - { - } - - public List Log() - { - string description; - List tupleLists = new List() - { - new TupleList() - { - Tuples = new ObservableCollection>() - { - new Tuple("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""), - new Tuple("CEP", (string.IsNullOrWhiteSpace(this.Cep) ? "" : this.Cep), ""), - new Tuple("ENDEREÇO", (string.IsNullOrWhiteSpace(this.Endereco) ? "" : this.Endereco), ""), - new Tuple("NÚMERO", (string.IsNullOrWhiteSpace(this.Numero) ? "" : this.Numero), ""), - new Tuple("COMPLEMENTO", (string.IsNullOrWhiteSpace(this.Complemento) ? "" : this.Complemento), ""), - new Tuple("BAIRRO", (string.IsNullOrWhiteSpace(this.Bairro) ? "" : this.Bairro), ""), - new Tuple("CIDADE", (string.IsNullOrWhiteSpace(this.Cidade) ? "" : this.Cidade), ""), - new Tuple("ESTADO", (string.IsNullOrWhiteSpace(this.Estado) ? "" : this.Estado), ""), - new Tuple("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), "") - } - } - }; - ObservableCollection> observableCollection = new ObservableCollection>() - { - new Tuple("TELEFONES$", "", "") - }; - foreach (AgendaTelefone telefone in this.Telefones) - { - observableCollection.Add(new Tuple(string.Format(" TELEFONE {0}$", this.Telefones.IndexOf(telefone) + 1), "", "")); - ObservableCollection> observableCollection1 = observableCollection; - TipoTelefone? tipo = telefone.Tipo; - if (!tipo.HasValue) - { - description = ""; - } - else - { - tipo = telefone.Tipo; - if (tipo.HasValue) - { - description = tipo.GetValueOrDefault().GetDescription(); - } - else - { - description = null; - } - } - observableCollection1.Add(new Tuple(" TIPO", description, "")); - observableCollection.Add(new Tuple(" PREFIXO", (string.IsNullOrWhiteSpace(telefone.Prefixo) ? "" : telefone.Prefixo.ToUpper()), "")); - observableCollection.Add(new Tuple(" NÚMERO", (string.IsNullOrWhiteSpace(telefone.Numero) ? "" : telefone.Numero), "")); - observableCollection.Add(new Tuple(" DESCRIÇÃO", (string.IsNullOrWhiteSpace(telefone.Observacao) ? "" : telefone.Observacao), "")); - } - tupleLists.Add(new TupleList() - { - Tuples = observableCollection - }); - ObservableCollection> observableCollection2 = new ObservableCollection>() - { - new Tuple("EMAILS$", "", "") - }; - foreach (AgendaEmail email in this.Emails) - { - observableCollection2.Add(new Tuple(string.Format(" EMAIL {0}$", this.Emails.IndexOf(email) + 1), "", "")); - observableCollection2.Add(new Tuple(" ENDEREÇO DE EMAIL", (string.IsNullOrWhiteSpace(email.Email) ? "" : email.Email), "")); - } - tupleLists.Add(new TupleList() - { - Tuples = observableCollection2 - }); - return tupleLists; - } - - public List> Validate() - { - List> keyValuePairs = ValidationHelper.AddValue(); - if (string.IsNullOrWhiteSpace(this.Nome)) - { - keyValuePairs.AddValue("Nome", Messages.Obrigatorio, true); - } - return keyValuePairs; - } - } -} \ No newline at end of file -- cgit v1.2.3