async void Imprimir_Faturas(string txtBillNo) { // Imprimir Faturas mais Recibo try { Cursor = Cursors.WaitCursor; var Docs = await pedidoModels.GetAll().Include(x => x.AlunoModels) .Include(x => x.PedidosOrdemModels) .ThenInclude(x => x.LivrosModels) .Where(x => x.DocNumero.Equals(txtBillNo)).FirstOrDefaultAsync(); if (Docs != null) { ReportControllers.GetReport(new rptPedidosFactura(Docs), false); } } catch (Exception exe) { EscreverLogs.Escrever(exe); } finally { Cursor = Cursors.Default; } }
private void MenuRelatoriosComprovativo_Click(object sender, System.EventArgs e) { var userdelete = pedidosModelsBindingSource.Current as PedidosModels; if (userdelete != null) { ReportControllers.GetReport(new rptPedidosFactura(userdelete), false); } }
private void MenuRelatorios_Click(object sender, System.EventArgs e) { var userdelete = pedidosModelsBindingSource.DataSource as List <PedidosModels>; if (userdelete.Count > 0) { ReportControllers.GetReport(new rptPedidos(userdelete), false); } }