예제 #1
0
 private void TextBox1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (char.IsLetter(e.KeyChar) && txtBoxBuscar.Text != string.Empty || char.IsDigit(e.KeyChar) && txtBoxBuscar.Text != string.Empty)
     {
         dgvHab.DataSource = habitacion.Search(txtBoxBuscar.Text);
     }
     else
     {
         cargar();
     }
 }