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 async void Loader() { Cursor = Cursors.WaitCursor; try { pedidosModelsBindingSource.DataSource = await pedidoModels .GetAll(dateTimePicker1.Value.Date, dateTimePicker2.Value.Date) .ToListAsync(); } finally { Cursor = Cursors.Default; } }