1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Markup;
using Gestor.Application.Servicos.Seguros;
using Gestor.Application.ViewModels.Ferramentas;
using Gestor.Application.Views.Generic;
using Gestor.Application.Views.Seguros;
using Gestor.Model.Common;
using Gestor.Model.Domain.Ferramentas;
using Gestor.Model.Domain.Relatorios;
using Gestor.Model.Domain.Seguros;
using MaterialDesignThemes.Wpf;
using Xceed.Wpf.AvalonDock.Controls;
namespace Gestor.Application.Views.Ferramentas;
public class ManutencaoPagamentosView : BaseUserControl, IComponentConnector, IStyleConnector
{
private bool _contentLoaded;
public ManutencaoPagamentosViewModel ViewModel { get; set; }
public ManutencaoPagamentosView()
{
((FrameworkElement)this).Tag = "MANUTENÇÃO DE PAGAMENTOS";
ViewModel = new ManutencaoPagamentosViewModel();
((FrameworkElement)this).DataContext = ViewModel;
InitializeComponent();
}
private async void Buscar_OnClick(object sender, RoutedEventArgs e)
{
ViewModel.Loading(isLoading: true);
await ViewModel.Buscar();
ViewModel.Loading(isLoading: false);
}
private async void Excluir_OnClick(object sender, RoutedEventArgs e)
{
if (ViewModel.Pagamentos == null || ViewModel.Pagamentos.All((ManutencaoPagamentos x) => !x.Selecionado))
{
await ViewModel.ShowMessage("NECESSÁRIO SELECIONAR OS PAGAMENTOS QUE DESEJA EXCLUIR ANTES DE PROSSEGUIR");
return;
}
bool? flag = await ViewModel.ShowSenha("DESEJA REALMENTE EXCLUIR OS PAGAMENTOS SELECIONADOS?\nESSE PROCEDIMENTO É IRREVERSÍVEL.");
if (flag.HasValue)
{
if (!flag.GetValueOrDefault())
{
await ViewModel.ShowMessage("SENHA INVÁLIDA");
return;
}
ViewModel.Loading(isLoading: true);
await ViewModel.Excluir();
ViewModel.Loading(isLoading: false);
}
}
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
ViewModel.Selecionar(value: true);
}
private async void Apolice_OnClick(object sender, RoutedEventArgs e)
{
Button val = (Button)sender;
ManutencaoPagamentos manutencao = (ManutencaoPagamentos)((FrameworkElement)val).DataContext;
if (manutencao != null)
{
ViewModel.Loading(isLoading: true);
long idDocumento = manutencao.IdDocumento;
Documento val2 = await new ApoliceServico().BuscarApoliceAsync(idDocumento);
if (val2 == null)
{
ViewModel.Loading(isLoading: false);
return;
}
((Window)new HosterWindow((ContentControl)(object)new ApoliceView(val2, lockInsert: true, invoke: false, (AcessoApolice)1, manutencao.IdParcela), "CADASTRO DE APÓLICES - " + val2.Controle.Cliente.Nome)).Show();
ViewModel.Loading(isLoading: false);
}
}
private void UnCheckBox_Checked(object sender, RoutedEventArgs e)
{
ViewModel.Selecionar(value: false);
}
private void FecharFiltro_OnClick(object sender, RoutedEventArgs e)
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Invalid comparison between Unknown and I4
ViewModel.VisibilityFiltroPersonalizado = (Visibility)(((int)ViewModel.VisibilityFiltroPersonalizado != 2) ? 2 : 0);
}
private void AdicionarFiltro_OnClick(object sender, RoutedEventArgs e)
{
ViewModel.AdcionarFiltroPersonalizado();
}
private void ExcluirFiltro_OnClick(object sender, RoutedEventArgs e)
{
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Expected O, but got Unknown
Chip val = (Chip)((sender is Chip) ? sender : null);
if (val != null)
{
ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
FiltroPersonalizado val3 = (FiltroPersonalizado)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
if (val3 != null)
{
ViewModel.FiltroPersonalizadoSelecionado.Remove(val3);
ViewModel.PesquisaPersonalizada();
}
}
}
[DebuggerNonUserCode]
[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent()
{
if (!_contentLoaded)
{
_contentLoaded = true;
Uri uri = new Uri("/Gestor.Application;component/views/ferramentas/manutencaopagamentosview.xaml", UriKind.Relative);
Application.LoadComponent((object)this, uri);
}
}
[DebuggerNonUserCode]
[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
internal Delegate _CreateDelegate(Type delegateType, string handler)
{
return Delegate.CreateDelegate(delegateType, this, handler);
}
[DebuggerNonUserCode]
[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
[EditorBrowsable(EditorBrowsableState.Never)]
void IComponentConnector.Connect(int connectionId, object target)
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0076: Expected O, but got Unknown
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Expected O, but got Unknown
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a5: Expected O, but got Unknown
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Expected O, but got Unknown
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Expected O, but got Unknown
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00ec: Expected O, but got Unknown
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0104: Expected O, but got Unknown
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_011c: Expected O, but got Unknown
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Expected O, but got Unknown
//IL_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_014b: Expected O, but got Unknown
//IL_014d: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Unknown result type (might be due to invalid IL or missing references)
//IL_0163: Expected O, but got Unknown
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_017a: Expected O, but got Unknown
//IL_017c: Unknown result type (might be due to invalid IL or missing references)
//IL_0188: Unknown result type (might be due to invalid IL or missing references)
//IL_0192: Expected O, but got Unknown
switch (connectionId)
{
case 1:
((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
break;
case 2:
((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
break;
case 3:
((ButtonBase)(Button)target).Click += new RoutedEventHandler(Buscar_OnClick);
break;
case 4:
((MenuItem)target).Click += new RoutedEventHandler(Excluir_OnClick);
break;
case 5:
((MenuItem)target).Click += new RoutedEventHandler(FecharFiltro_OnClick);
break;
case 6:
((ButtonBase)(Button)target).Click += new RoutedEventHandler(FecharFiltro_OnClick);
break;
case 7:
((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
break;
case 8:
((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
break;
case 9:
((ButtonBase)(Button)target).Click += new RoutedEventHandler(AdicionarFiltro_OnClick);
break;
default:
_contentLoaded = true;
break;
}
}
[DebuggerNonUserCode]
[GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
[EditorBrowsable(EditorBrowsableState.Never)]
void IStyleConnector.Connect(int connectionId, object target)
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Expected O, but got Unknown
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Expected O, but got Unknown
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Expected O, but got Unknown
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
switch (connectionId)
{
case 10:
((Chip)target).DeleteClick += new RoutedEventHandler(ExcluirFiltro_OnClick);
break;
case 11:
((ToggleButton)(CheckBox)target).Checked += new RoutedEventHandler(CheckBox_Checked);
((ToggleButton)(CheckBox)target).Unchecked += new RoutedEventHandler(UnCheckBox_Checked);
break;
case 12:
((ButtonBase)(Button)target).Click += new RoutedEventHandler(Apolice_OnClick);
break;
}
}
}
|