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 /Gestor.Application/ViewModels/Generic/ExtratoComissaoViewModel.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Gestor.Application/ViewModels/Generic/ExtratoComissaoViewModel.cs')
| -rw-r--r-- | Gestor.Application/ViewModels/Generic/ExtratoComissaoViewModel.cs | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/Gestor.Application/ViewModels/Generic/ExtratoComissaoViewModel.cs b/Gestor.Application/ViewModels/Generic/ExtratoComissaoViewModel.cs deleted file mode 100644 index 7630bbd..0000000 --- a/Gestor.Application/ViewModels/Generic/ExtratoComissaoViewModel.cs +++ /dev/null @@ -1,147 +0,0 @@ -using Gestor.Application.Helpers;
-using Gestor.Application.Servicos;
-using Gestor.Model.Domain.Configuracoes;
-using Gestor.Model.Domain.Ferramentas;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Domain.Seguros;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-
-namespace Gestor.Application.ViewModels.Generic
-{
- public class ExtratoComissaoViewModel : BaseViewModel
- {
- private ServicoExtrato _servico;
-
- private bool _apelido;
-
- private List<Seguradora> _seguradoras;
-
- private DateTime _inicio;
-
- private DateTime _fim;
-
- private ObservableCollection<Extrato> _extratos;
-
- public bool Apelido
- {
- get
- {
- return this._apelido;
- }
- set
- {
- this._apelido = value;
- base.OnPropertyChanged("Apelido");
- }
- }
-
- public ObservableCollection<Extrato> Extratos
- {
- get
- {
- return this._extratos;
- }
- set
- {
- this._extratos = value;
- base.OnPropertyChanged("Extratos");
- }
- }
-
- public DateTime Fim
- {
- get
- {
- return this._fim;
- }
- set
- {
- this._fim = value;
- base.OnPropertyChanged("Fim");
- }
- }
-
- public DateTime Inicio
- {
- get
- {
- return this._inicio;
- }
- set
- {
- this._inicio = value;
- base.OnPropertyChanged("Inicio");
- }
- }
-
- public List<Seguradora> Seguradoras
- {
- get
- {
- return this._seguradoras;
- }
- set
- {
- this._seguradoras = value;
- base.OnPropertyChanged("Seguradoras");
- }
- }
-
- public ExtratoComissaoViewModel(List<Seguradora> seguradoras)
- {
- DateTime date = Funcoes.GetNetworkTime().Date;
- int year = date.Year;
- date = Funcoes.GetNetworkTime().Date;
- this._inicio = new DateTime(year, date.Month, 1);
- this._fim = Funcoes.GetNetworkTime().Date;
- base();
- this._servico = new ServicoExtrato();
- this.Apelido = Recursos.Configuracoes.Any<ConfiguracaoSistema>((ConfiguracaoSistema x) => x.get_Configuracao() == 6);
- this.Seguradoras = seguradoras;
- }
-
- public async Task CarregarExtratos(Seguradora seguradora, DateTime inicio, DateTime fim)
- {
- this.Extratos = new ObservableCollection<Extrato>(await this._servico.BuscarExtrato(seguradora.get_Id(), (long)0, 4, inicio, fim));
- }
-
- internal List<NotaFiscal> Selecionar()
- {
- if (this.Extratos == null)
- {
- return null;
- }
- return (
- from x in this.Extratos
- where x.get_Selecionado()
- select x).Select<Extrato, NotaFiscal>((Extrato x) => {
- NotaFiscal notaFiscal = new NotaFiscal();
- notaFiscal.set_IdExtrato(new long?(x.get_Id()));
- notaFiscal.set_Seguradora(x.get_Seguradora());
- notaFiscal.set_Data(x.get_Data());
- notaFiscal.set_Iss(x.get_Iss().GetValueOrDefault());
- notaFiscal.set_Ir(x.get_Ir().GetValueOrDefault());
- notaFiscal.set_ValorBruto(x.get_Bruto().GetValueOrDefault());
- notaFiscal.set_ValorLiquido(x.get_Liquido().GetValueOrDefault());
- notaFiscal.set_Extrato(x.get_Numero());
- return notaFiscal;
- }).ToList<NotaFiscal>();
- }
-
- internal void SelecionarTudo()
- {
- if (this.Extratos == null)
- {
- return;
- }
- this.Extratos.ToList<Extrato>().ForEach((Extrato x) => x.set_Selecionado(!x.get_Selecionado()));
- this.Extratos = new ObservableCollection<Extrato>(this.Extratos);
- }
- }
-}
\ No newline at end of file |