private void txtCodigo_KeyDown_1(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F2) { fShow fsw = new fShow("CENTROCUSTOS", new string[] { "Codigo", "Descricao" }, "Codigo"); fsw.ShowDialog(); txtCodigo.Text = fsw.ParametroID.ToString(); if (txtCodigo.Text != "") { SendKeys.SendWait("{TAB}"); } } }
private void txtID_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F2) { fShow fsw = new fShow("FORNECEDORES", new string[] { "Id", "Nome", "Endereco", "Cidade", "Cnpj", "Telefone", "Email" }, "Nome"); fsw.ShowDialog(); txtID.Text = fsw.ParametroID.ToString(); if (txtID.Text != "") { SendKeys.SendWait("{TAB}"); } } }
private void txtCentrodeCustos_KeyDown(object sender, KeyEventArgs e) { /* * if (e.KeyCode == Keys.F2) * { * //cmbCentroCustos.Visible = true; * //cmbCentroCustos.Focus(); * } */ if (e.KeyCode == Keys.F2) { fShow fsw = new fShow("CENTROCUSTOS", new string[] { "Codigo", "Descricao" }, "Codigo"); fsw.ShowDialog(); txtCentrodeCustos.Text = fsw.ParametroID.ToString(); if (txtCentrodeCustos.Text != "") { SendKeys.SendWait("{TAB}"); } } }