summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.ViewModels.Drawer.Ajuda/BoletosNotasViewModel.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 15:29:41 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 15:29:41 +0000
commit225aa1499e37faf9d38257caabbadc68d78b427e (patch)
tree102bb7a40c58595348ae9d3c7076201759fe0720 /Decompiler/Gestor.Application.ViewModels.Drawer.Ajuda/BoletosNotasViewModel.cs
parent1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff)
downloadgestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz
gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.ViewModels.Drawer.Ajuda/BoletosNotasViewModel.cs')
-rw-r--r--Decompiler/Gestor.Application.ViewModels.Drawer.Ajuda/BoletosNotasViewModel.cs100
1 files changed, 100 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.ViewModels.Drawer.Ajuda/BoletosNotasViewModel.cs b/Decompiler/Gestor.Application.ViewModels.Drawer.Ajuda/BoletosNotasViewModel.cs
new file mode 100644
index 0000000..39f6c10
--- /dev/null
+++ b/Decompiler/Gestor.Application.ViewModels.Drawer.Ajuda/BoletosNotasViewModel.cs
@@ -0,0 +1,100 @@
+using System.Collections.Generic;
+using System.Linq;
+using Gestor.Application.Model.Ajuda;
+using Gestor.Application.Servicos.Ajuda;
+using Gestor.Application.ViewModels.Generic;
+
+namespace Gestor.Application.ViewModels.Drawer.Ajuda;
+
+public class BoletosNotasViewModel : BaseViewModel
+{
+ private readonly AjudaServico _ajudaServico;
+
+ private bool _carregando;
+
+ private List<Boleto> _boletos;
+
+ private string _boletoDisponivel;
+
+ private List<string> _status;
+
+ public bool Carregando
+ {
+ get
+ {
+ return _carregando;
+ }
+ set
+ {
+ _carregando = value;
+ base.IsEnabled = !value;
+ base.EnableMenu = !value;
+ OnPropertyChanged("Carregando");
+ }
+ }
+
+ public List<Boleto> Boletos
+ {
+ get
+ {
+ return _boletos;
+ }
+ set
+ {
+ _boletos = value;
+ OnPropertyChanged("Boletos");
+ }
+ }
+
+ public string BoletoDisponivel
+ {
+ get
+ {
+ return _boletoDisponivel;
+ }
+ set
+ {
+ _boletoDisponivel = value;
+ OnPropertyChanged("BoletoDisponivel");
+ }
+ }
+
+ public List<string> Status
+ {
+ get
+ {
+ return _status;
+ }
+ set
+ {
+ _status = value;
+ OnPropertyChanged("Status");
+ }
+ }
+
+ public BoletosNotasViewModel()
+ {
+ _ajudaServico = new AjudaServico();
+ LoadCombos();
+ BoletoDisponivel = "Disponível para impressão a partir de\n10 (dez) dias antes do vencimento";
+ }
+
+ private void LoadCombos()
+ {
+ Status = new List<string>();
+ Status.Add("PENDENTES");
+ Status.Add("BAIXADOS");
+ }
+
+ public async void WorkOnSelectedStatus(string value)
+ {
+ Carregando = true;
+ Boletos = new List<Boleto>();
+ List<Boleto> list = await _ajudaServico.BuscarBoletosNotas(value);
+ Boletos = ((value == "BAIXADOS") ? (from x in list
+ where x.Pagamento.HasValue
+ orderby x.Pagamento descending
+ select x).ToList() : list);
+ Carregando = false;
+ }
+}