diff options
Diffstat (limited to 'Decompiler/Gestor.Application.Drawers.Relatorios/FiltroRelatorio.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.Drawers.Relatorios/FiltroRelatorio.cs | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Drawers.Relatorios/FiltroRelatorio.cs b/Decompiler/Gestor.Application.Drawers.Relatorios/FiltroRelatorio.cs new file mode 100644 index 0000000..72c0994 --- /dev/null +++ b/Decompiler/Gestor.Application.Drawers.Relatorios/FiltroRelatorio.cs @@ -0,0 +1,155 @@ +using System; +using System.CodeDom.Compiler; +using System.ComponentModel; +using System.Diagnostics; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Markup; +using Gestor.Application.ViewModels.Relatorios; +using Gestor.Model.Common; +using MaterialDesignThemes.Wpf; + +namespace Gestor.Application.Drawers.Relatorios; + +public class FiltroRelatorio : UserControl, IComponentConnector +{ + private RelatorioViewModel ViewModel; + + internal MaterialDataGridTextColumn IdField; + + internal MaterialDataGridTextColumn NomeField; + + internal MaterialDataGridTextColumn ApelidoField; + + internal DataGrid RamosGrid; + + internal DataGrid VendedorGrid; + + internal DataGrid TipoSeguroGrid; + + internal DataGrid TipoVendedorGrid; + + internal DataGrid NegocioGrid; + + internal DataGrid ProdutoGrid; + + internal DataGrid EstipulanteGrid; + + private bool _contentLoaded; + + public FiltroRelatorio(RelatorioViewModel viewModel, Relatorio relatorio) + { + //IL_00d0: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Invalid comparison between Unknown and I4 + ViewModel = viewModel; + ((FrameworkElement)this).DataContext = ViewModel; + InitializeComponent(); + viewModel.ReloadVendedores(); + ((UIElement)VendedorGrid).Visibility = (Visibility)((viewModel.Vendedores.Count <= 0) ? 2 : 0); + ((UIElement)EstipulanteGrid).Visibility = (Visibility)((viewModel.Estipulantes.Count <= 0) ? 2 : 0); + ((UIElement)ProdutoGrid).Visibility = (Visibility)((viewModel.Produtos.Count <= 0) ? 2 : 0); + ((DataGridColumn)IdField).Visibility = (Visibility)(ViewModel.Apelido ? 2 : 0); + ((DataGridColumn)NomeField).Visibility = (Visibility)(ViewModel.Apelido ? 2 : 0); + ((DataGridColumn)ApelidoField).Visibility = (Visibility)((!ViewModel.Apelido) ? 2 : 0); + if ((int)relatorio == 19) + { + ((UIElement)RamosGrid).Visibility = (Visibility)2; + ((UIElement)TipoSeguroGrid).Visibility = (Visibility)2; + ((UIElement)VendedorGrid).Visibility = (Visibility)2; + ((UIElement)EstipulanteGrid).Visibility = (Visibility)2; + ((UIElement)ProdutoGrid).Visibility = (Visibility)2; + ((UIElement)TipoVendedorGrid).Visibility = (Visibility)2; + ((UIElement)NegocioGrid).Visibility = (Visibility)2; + } + ViewModel.EnableMenu = true; + } + + private void Fechar_OnClick(object sender, RoutedEventArgs e) + { + ViewModel.Filtro = ""; + ViewModel.AdicionarFiltros(); + ViewModel.CloseDrawer(); + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + public void InitializeComponent() + { + if (!_contentLoaded) + { + _contentLoaded = true; + Uri uri = new Uri("/Gestor.Application;component/drawers/relatorios/filtrorelatorio.xaml", UriKind.Relative); + Application.LoadComponent((object)this, uri); + } + } + + [DebuggerNonUserCode] + [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] + [EditorBrowsable(EditorBrowsableState.Never)] + void IComponentConnector.Connect(int connectionId, object target) + { + //IL_003a: Unknown result type (might be due to invalid IL or missing references) + //IL_0046: Unknown result type (might be due to invalid IL or missing references) + //IL_0050: Expected O, but got Unknown + //IL_0053: Unknown result type (might be due to invalid IL or missing references) + //IL_005d: Expected O, but got Unknown + //IL_0060: Unknown result type (might be due to invalid IL or missing references) + //IL_006a: Expected O, but got Unknown + //IL_006d: Unknown result type (might be due to invalid IL or missing references) + //IL_0077: Expected O, but got Unknown + //IL_007a: Unknown result type (might be due to invalid IL or missing references) + //IL_0084: Expected O, but got Unknown + //IL_0087: Unknown result type (might be due to invalid IL or missing references) + //IL_0091: Expected O, but got Unknown + //IL_0094: Unknown result type (might be due to invalid IL or missing references) + //IL_009e: Expected O, but got Unknown + //IL_00a1: Unknown result type (might be due to invalid IL or missing references) + //IL_00ab: Expected O, but got Unknown + //IL_00ae: Unknown result type (might be due to invalid IL or missing references) + //IL_00b8: Expected O, but got Unknown + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c5: Expected O, but got Unknown + //IL_00c8: Unknown result type (might be due to invalid IL or missing references) + //IL_00d2: Expected O, but got Unknown + switch (connectionId) + { + case 1: + ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Fechar_OnClick); + break; + case 2: + IdField = (MaterialDataGridTextColumn)target; + break; + case 3: + NomeField = (MaterialDataGridTextColumn)target; + break; + case 4: + ApelidoField = (MaterialDataGridTextColumn)target; + break; + case 5: + RamosGrid = (DataGrid)target; + break; + case 6: + VendedorGrid = (DataGrid)target; + break; + case 7: + TipoSeguroGrid = (DataGrid)target; + break; + case 8: + TipoVendedorGrid = (DataGrid)target; + break; + case 9: + NegocioGrid = (DataGrid)target; + break; + case 10: + ProdutoGrid = (DataGrid)target; + break; + case 11: + EstipulanteGrid = (DataGrid)target; + break; + default: + _contentLoaded = true; + break; + } + } +} |