Esempio n. 1
0
 private void txtEmail_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9)
     {
         txtEmail.Text = Valida.consultaF9(11, "where ds_email is not null and st_ativo = 't'", "ds_email");
     }
 }
Esempio n. 2
0
 private void btnVisualizarLista_Click(object sender, EventArgs e)
 {
     if (!txtSequencial.Text.Equals(String.Empty))
     {
         Valida.consultaF9(Convert.ToInt32(txtSequencial.Text), "", "");
     }
     else
     {
         Alert.atencao("É necessário selecionar uma lista de consulta, para que a mesma seja aberta.");
     }
 }
Esempio n. 3
0
 private void frmRelCliente_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9)
     {
         txtcdCliente.Text = Valida.consultaF9(5, "", "cd_cliente");
         txtcdCliente_Validated(sender, e);
     }
     if (e.KeyCode == Keys.F12)
     {
         btnImprimir_Click(sender, e);
     }
 }
Esempio n. 4
0
 private void btnConsultaUsuarioPermissao_Click(object sender, EventArgs e)
 {
     if (!txtcdUsuarioPermissao.Text.Equals(String.Empty))
     {
         caregaNo(txtcdUsuarioPermissao.Text);
     }
     else
     {
         txtcdUsuarioPermissao.Text = Valida.consultaF9(1, "", "cd_usuario");
         txtcdUsuarioPermissao.Focus();
         txtcdUsuarioPermissao_Validated(sender, e);
     }
 }
Esempio n. 5
0
 private void frmLogin_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         this.SelectNextControl(this.ActiveControl, !e.Shift, true, true, true);
     }
     if (e.KeyCode == Keys.F9)
     {
         if (ActiveControl.Parent.Name.Equals("txtcdUsuario"))
         {
             txtcdUsuario.Text = Valida.consultaF9(7, "", "cd_usuario");
             txtdsUsuario_Validated(sender, e);
         }
     }
 }
Esempio n. 6
0
 private void frmModulo_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9)
     {
         if (ActiveControl.Parent.Name.Equals("txtcdModulo"))
         {
             txtcdModulo.Text = Valida.consultaF9(2, "", "cd_modulo");
             txtcdModulo_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdModuloSubMenu"))
         {
             txtcdModuloSubMenu.Text = Valida.consultaF9(2, "", "cd_modulo");
             txtcdModuloSubMenu_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdSubMenu"))
         {
             txtcdSubMenu.Text = Valida.consultaF9(3, "", "cd_submenu");
             txtcdSubMenu_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdModuloPrograma"))
         {
             txtcdModuloPrograma.Text = Valida.consultaF9(2, "", "cd_modulo");
             txtcdModuloPrograma_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdSubMenuPrograma"))
         {
             txtcdSubMenuPrograma.Text = Valida.consultaF9(3, "", "cd_submenu");
             txtcdSubMenuPrograma_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdPrograma"))
         {
             txtcdPrograma.Text = Valida.consultaF9(4, "", "cd_programa");
             txtcdPrograma_Validated(sender, e);
         }
     }
     if (e.KeyCode == Keys.Enter)
     {
         this.SelectNextControl(this.ActiveControl, !e.Shift, true, true, true);
     }
 }
Esempio n. 7
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     txtcdCliente.Text = Valida.consultaF9(5, "", "cd_cliente");
     txtcdCliente_Validated(sender, e);
 }
Esempio n. 8
0
 private void frmAcesso_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F9)
     {
         if (ActiveControl.Parent.Name.Equals("txtcdUsuario"))
         {
             txtcdUsuario.Text = Valida.consultaF9(1, "", "cd_usuario");
             txtcdUsuario_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdUsuarioPermissao"))
         {
             txtcdUsuarioPermissao.Text = Valida.consultaF9(1, "", "cd_usuario");
             txtcdUsuarioPermissao_Validated(sender, e);
             btnConsultaUsuarioPermissao_Click(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdUsuarioMenuArvore"))
         {
             txtcdUsuarioMenuArvore.Text = Valida.consultaF9(1, "", "cd_usuario");
             txtcdUsuarioMenuArvore_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdModuloMenuArvore"))
         {
             txtcdModuloMenuArvore.Text = Valida.consultaF9(2, "", "cd_modulo");
             txtcdModuloMenuArvore_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdProgramaMenuArvore"))
         {
             txtcdProgramaMenuArvore.Text = Valida.consultaF9(4, String.Format(" where cd_modulo = '{0}'", txtcdModuloMenuArvore.Text), "cd_programa");
             txtcdProgramaMenuArvore_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdUsuarioOrigem"))
         {
             txtcdUsuarioOrigem.Text = Valida.consultaF9(1, "", "cd_usuario");
             txtcdUsuarioOrigem_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdUsuarioDestino"))
         {
             txtcdUsuarioDestino.Text = Valida.consultaF9(1, "", "cd_usuario");
             txtcdUsuarioDestino_Validated(sender, e);
         }
         #region 'Relatório de Acessos'
         if (ActiveControl.Parent.Name.Equals("txtcdUsuarioRelatorio"))
         {
             txtcdUsuarioRelatorio.Text = Valida.consultaF9(1, "", "cd_usuario");
             txtcdUsuarioRelatorio_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdModuloRelatorio"))
         {
             txtcdModuloRelatorio.Text = Valida.consultaF9(2, "", "cd_modulo");
             txtcdModuloRelatorio_Validated(sender, e);
         }
         if (ActiveControl.Parent.Name.Equals("txtcdProgramaRelatorio"))
         {
             txtcdProgramaRelatorio.Text = Valida.consultaF9(4, String.Format(" where cd_modulo = '{0}'", txtcdModuloRelatorio.Text), "cd_programa");
             txtcdProgramaRelatorio_Validated(sender, e);
         }
         #endregion
     }
     if (e.KeyCode == Keys.Enter)
     {
         this.SelectNextControl(this.ActiveControl, !e.Shift, true, true, true);
     }
 }