예제 #1
0
 private void txtID_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         e.Handled = true;
         if (string.IsNullOrEmpty(txtID.Text))
         {
             wp_Incluir = true;
         }
         else
         {
             wp_Incluir = false;
             if (!fornX.ConsultaFornecedorId(int.Parse(txtID.Text)))
             {
                 MessageBox.Show("O ID Informado não foi encontrado !");
                 txtID.Focus();
             }
             else
             {
                 BuscaDadosClasse();
                 gpoDados.Enabled = true;
                 txtNome.Focus();
             }
         }
     }
 }