private void txtCodigoDaComanda_KeyPress(object sender, KeyPressEventArgs e) { try { ValidatorField.IntegerAndLetter(e); ValidatorField.NoSpace(e); if ((Keys)e.KeyChar == Keys.Enter) { Espere espere = new Espere(); CarregarComandaAtiva(espere); MostrarBotaoVendaSeExisteItensNaComanda(); LimparTxt(new List <TextBox>() { txtCodigoDaComanda }); FocarNoTxt(txtQuantidade); espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) { mensagem.Close(); } } } catch (CustomException erro) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(erro.Message, "Aviso"); } catch (Exception erro) { DialogMessage.MessageComButtonOkIconeErro(erro.Message, "Erro"); } }
private void btnConferenciaEstoque_Click(object sender, EventArgs e) { try { espere = new Espere(); espere.Start(MostrarMensagemEspera); string fileName = "estoqueConferencia.rdlc"; RelatorioEstoqueConferenciaRepositorio estoqueConferenciaRepositorio = new RelatorioEstoqueConferenciaRepositorio(); var table = estoqueConferenciaRepositorio.GetRelatorioConferencia(); MyReport report = new MyReport(table, fileName.GetFullPath(), "EstoqueConferencia", ProcessingMode.Local); report.GerarRelatoriosComParametrosEQueryDefinidosNaQueryPDF(new System.Collections.Generic.List <ReportParameter> { new ReportParameter("NomeConf", Usuarios.NomeCompletoStatic) }); espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) { frmEspera?.Close(); } } catch (CustomException error) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } catch (Exception error) { SaveErroInTxt.RecordInTxt(error, this.GetType().Name); DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } finally { espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) { frmEspera?.Close(); } } }
private void btnRelatorioCompra_Click(object sender, EventArgs e) { try { espere = new Espere(); espere.Start(MostrarMensagemEspera); _DbContext banco = new _DbContext(); string fileName = "rpvCompras.rdlc"; RelatorioCompraRepositorio relatorio = new RelatorioCompraRepositorio(); var table = relatorio.GerarRelatorioDeVendas(); MyReport report = new MyReport(table, fileName.GetFullPath(), "Compras", ProcessingMode.Local); report.GerarRelatoriosComParametrosDefinidosNaQueryPDF(); espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) { frmEspera?.Close(); } } catch (CustomException error) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } catch (Exception error) { SaveErroInTxt.RecordInTxt(error, this.GetType().Name); DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } finally { espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) { frmEspera?.Close(); } } }
private static void CancelarMensagem() { try { espere?.CancelarTask(); if (espere.Cancel.IsCancellationRequested) { mensagem?.Close(); } } catch (CustomException error) { throw new CustomException(error.Message); } catch (Exception error) { throw new Exception(error.Message); } }
private void txtCodigoDaComanda_KeyPress(object sender, KeyPressEventArgs e) { try { ValidatorField.IntegerAndLetter(e); ValidatorField.NoSpace(e); if ((Keys)e.KeyChar == Keys.Enter) { Espere espere = new Espere(); CarregarComandaAtiva(espere); MostrarBotaoVendaSeExisteItensNaComanda(); LimparTxt(new List<TextBox>() { txtCodigoDaComanda }); FocarNoTxt(txtQuantidade); espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) { mensagem.Close(); } } } catch (CustomException erro) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(erro.Message, "Aviso"); } catch (Exception erro) { DialogMessage.MessageComButtonOkIconeErro(erro.Message, "Erro"); } }
private void btnConferenciaEstoque_Click(object sender, EventArgs e) { try { espere = new Espere(); espere.Start(MostrarMensagemEspera); string fileName = "estoqueConferencia.rdlc"; RelatorioEstoqueConferenciaRepositorio estoqueConferenciaRepositorio = new RelatorioEstoqueConferenciaRepositorio(); var table = estoqueConferenciaRepositorio.GetRelatorioConferencia(); MyReport report = new MyReport(table, fileName.GetFullPath(), "EstoqueConferencia", ProcessingMode.Local); report.GerarRelatoriosComParametrosEQueryDefinidosNaQueryPDF(new System.Collections.Generic.List<ReportParameter> { new ReportParameter("NomeConf",Usuarios.NomeCompletoStatic) }); espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) frmEspera?.Close(); } catch (CustomException error) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } catch (Exception error) { SaveErroInTxt.RecordInTxt(error, this.GetType().Name); DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } finally { espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) frmEspera?.Close(); } }
private void btnRelatorioCompra_Click(object sender, EventArgs e) { try { espere = new Espere(); espere.Start(MostrarMensagemEspera); _DbContext banco = new _DbContext(); string fileName = "rpvCompras.rdlc"; RelatorioCompraRepositorio relatorio = new RelatorioCompraRepositorio(); var table = relatorio.GerarRelatorioDeVendas(); MyReport report = new MyReport(table, fileName.GetFullPath(), "Compras", ProcessingMode.Local); report.GerarRelatoriosComParametrosDefinidosNaQueryPDF(); espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) frmEspera?.Close(); } catch (CustomException error) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } catch (Exception error) { SaveErroInTxt.RecordInTxt(error, this.GetType().Name); DialogMessage.MessageFullComButtonOkIconeDeInformacao(message: error.Message, title: "Aviso"); } finally { espere.CancelarTask(); if (espere.Cancel.IsCancellationRequested) frmEspera?.Close(); } }