private void txtPesquisar_KeyPress(object sender, KeyPressEventArgs e) { try { ValidatorField.AllowOneSpaceTogether(e, sender); if ((Keys)e.KeyChar == Keys.Enter) { switch (SelecionarTextoDoRadioButtonSelecionado()) { case "Código": _produtoRepositorio.SelectProdutoPeloCodigo(dgv: dgvProdutos, codigo: txtPesquisar.Text); break; } } } catch (CustomException erro) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(erro.Message, "Aviso"); } catch (Exception erro) { SaveErroInTxt.RecordInTxt(erro, this.GetType().Name); DialogMessage.MessageComButtonOkIconeErro(erro.Message, "Erro"); } }
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 txtEstoque_KeyPress(object sender, KeyPressEventArgs e) { try { ValidatorField.IntegerAndLetter(e: e); LimparFocoDoDataGridView(); if ((Keys)e.KeyChar == Keys.Enter) { if (_estoqueRepositorio.GetQuantidade() > 0) { if (ckbPorCodigo.Checked) { _estoqueRepositorio.ListarPorCodigo(dgv: dgvEstoque, codigo: txtEstoque.Text); } } } } catch (CustomException erro) { DialogMessage.MessageFullComButtonOkIconeDeInformacao(erro.Message, "Aviso"); LimparTxt(); FocoNoTxt(); } catch (Exception erro) { DialogMessage.MessageComButtonOkIconeErro(erro.Message, "Erro"); } }
private void txtValorDoProdutoPorpeso_KeyPress(object sender, KeyPressEventArgs e) { /*if ((Keys)e.KeyChar == Keys.Enter) * { * e.Handled = false; * } */ ValidatorField.Peso(e: e, sender: sender); }
private void txtLogin_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.AllowOneSpaceTogether(e, sender); if (e.KeyChar == (char)Keys.Enter) { FocarNotxt(txt: txtSenha); } }
private void mtbCpf_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.IntegerAndLetter(e: e); if (e.KeyChar == (char)Keys.Enter) { FocarNoButton(btn: btnCadastrar); } }
private void mtbTelefone_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Integer(e: e); if (e.KeyChar == (char)Keys.Enter) { FocarNoMtb(mtb: mtbCpf); } }
private void txtDescricao_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.IntegerAndLetter(e: e); if ((Keys)e.KeyChar == Keys.Enter) { FocarNoTxt(txtPrecoCompra); } }
private void txtQtdMaxima_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Integer(e: e); if ((Keys)e.KeyChar == Keys.Enter) { FocarNoBotao(); } }
private void txtSenha_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.AllowOneSpaceTogether(e, sender); if (e.KeyChar == (char)Keys.Enter) { FocarNoBtn(btn: btnEntrar); } }
private void txtQuantidade_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Integer(e); if ((Keys)e.KeyChar == Keys.Enter) { FocarNoTxt(txtCodigoDoProduto); } }
private void txtValorPago_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.NoVirgula(e, sender); ValidatorField.Money(e); if (Keys.Enter == (Keys)e.KeyChar) { FocarNoBotao(); } }
private void txtNome_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Letter(e); ValidatorField.AllowOneSpaceTogether(e, sender); if (e.KeyChar == (char)Keys.Enter) { FocarNoMtb(mtb: mtbTelefone); } }
private void txtEstoque_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.NoVirgula(e: e, sender: sender); ValidatorField.Integer(e: e); if ((Keys)e.KeyChar == Keys.Enter) { FocarNoTxt(txtQtdMinima); } }
private void txtPrecoVenda_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.NoVirgula(e: e, sender: sender); ValidatorField.Money(e: e); if ((Keys)e.KeyChar == Keys.Enter) { FocarNoBotao(); } }
private void txtCodigo_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.IntegerAndLetter(e: e); ValidatorField.NoSpace(e); if ((Keys)e.KeyChar == Keys.Enter) { FocarNoTxt(txtNome); } }
private void txtComanda_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.IntegerAndLetter(e: e); ValidatorField.NoSpace(e); if (e.KeyChar == (char)Keys.Enter) { FocarNoBtn(); } }
private void txtCategoria_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.IntegerAndLetter(e: e); ValidatorField.AllowOneSpaceTogether(e, sender); if (e.KeyChar == (char)Keys.Enter) { FocarNoBtn(); } }
private void txtValorSangria_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Money(e); ValidatorField.NoVirgula(e, sender); if (e.KeyChar == (char)Keys.Enter) { if ((sender as TextBox).Text.Length == 0) { FocarNoTxt(txt: txtDescricao); } } }
private void txtConfirmarSenha_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.AllowOneSpaceTogether(e, sender); if (e.KeyChar == (char)Keys.Enter) { if (cbbPermissao.Enabled == true) { this.ActiveControl = cbbPermissao; MostrarItensDoCbb(cbb: cbbPermissao); } else { FocarNoBtn(btn: btnCadastrar); } } }
private void txtNome_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.IntegerAndLetter(e: e); ValidatorField.AllowOneSpaceTogether(e, sender); if ((Keys)e.KeyChar == Keys.Enter) { if (cbbCategoria.Items.Count > 0) { FocarNoCbb(cbbCategoria); MostrarItensDoCbb(cbb: cbbCategoria); } else { FocarNoBotao(btnAdicionarCategoria); } } }
private void dgvProdutos_KeyDown(object sender, KeyEventArgs e) { ValidatorField.DisableTabInGrid(sender, e); }
private void dgvCliente_KeyDown(object sender, KeyEventArgs e) => ValidatorField.DisableTabInGrid(sender, e);
private void txtPesquisar_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Letter(e); ValidatorField.AllowOneSpaceTogether(e, sender); }
private void txtAdicionarNoCaixa_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.NoVirgula(e, sender); ValidatorField.Money(e); }
private void txtValorPago_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.NoVirgula(e, sender); ValidatorField.Money(e); }
private void txtNumeroDeParcelas_KeyPress(object sender, KeyPressEventArgs e) => ValidatorField.Integer(e);
private void mtbCpf_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.IntegerAndLetter(e: e); }
private void mtbTelefone_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Integer(e: e); }
private void txtNome_KeyPress(object sender, KeyPressEventArgs e) { ValidatorField.Letter(e: e); }