private void ConsultarCliente(int id, string nome, TipoPesquisaGeral tipoPesquisaGeral) { var consulta = new ConsultaCliente(); try { if (tipoPesquisaGeral != TipoPesquisaGeral.pgTela) { txtCodCliente.Text = ""; txtNomeCliente.Text = ""; } var model = consulta.Pesquisar(id, nome, DadosStaticos.IdEmpresa, tipoPesquisaGeral); if (model != null) { txtCodCliente.Text = model.Cod_Cliente.ToString(); txtNomeCliente.Text = model.Nome; Carregar(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } txtCodCliente.Modified = false; txtNomeCliente.Modified = false; }
private void consultaDeClienteToolStripMenuItem_Click(object sender, EventArgs e) { ConsultaCliente consultaCliente = new ConsultaCliente(); consultaCliente.Show(); consultaCliente.MdiParent = this; }
private void ConsultarCliente(int codigo, string nome, TipoPesquisa tipoPesquisa) { var consulta = new ConsultaCliente(); try { if (tipoPesquisa != TipoPesquisa.Tela) { txtId.Text = ""; txtCodigo.txtValor.Text = ""; txtNome.Text = ""; } var model = consulta.Pesquisar(codigo, nome, tipoPesquisa); if (model != null) { txtId.Text = model.Id.ToString(); txtCodigo.txtValor.Text = model.Codigo.ToString(_mascara); txtNome.Text = model.Nome; _objeto = model; Modificou = true; } } catch (Exception ex) { MessageBox.Show(ex.Message); txtCodigo.Focus(); } txtId.Modified = false; txtCodigo.txtValor.Modified = false; txtNome.Modified = false; }
private void clientesToolStripMenuItem1_Click(object sender, EventArgs e) { ConsultaCliente r = new ConsultaCliente(); r.MdiParent = this; r.Show(); }
private void Cliente_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { ConsultaCliente.Exibe(); } }
private void ConsultarCliente(int codigo, string nome, TipoPesquisa tipoPesquisa) { var consulta = new ConsultaCliente(); if (tipoPesquisa != TipoPesquisa.Tela) { txtCodigo.txtValor.Text = ""; txtNome.Text = ""; } var model = consulta.Pesquisar(codigo, nome, tipoPesquisa); if (model != null) { dgvFiltro.Rows.Add(model.Id, model.Codigo, model.Nome); txtCodigo.txtValor.Focus(); } }
private void btn_ConsultaClienteClick(object sender, EventArgs e) { ConsultaCliente consultaClienteClick = new ConsultaCliente(this); consultaClienteClick.Show(); }
private void BtCliente_Click(object sender, EventArgs e) { ConsultaCliente.Exibe(); }