예제 #1
0
 private void AsignarCeldasDataGridViewAVariables()
 {
     ContactoDataGridView.Focus();
     IdContact           = ContactoDataGridView.CurrentRow.Cells["id"].Value.ToString();
     IdNumberContact     = ContactoDataGridView.CurrentRow.Cells["id_number"].Value.ToString();
     BusinessNameContact = ContactoDataGridView.CurrentRow.Cells["business_name"].Value.ToString();
     AddressContact      = ContactoDataGridView.CurrentRow.Cells["address"].Value.ToString();
     LandlineContact     = ContactoDataGridView.CurrentRow.Cells["landline"].Value.ToString();
 }
예제 #2
0
 private void EventoKeyDownContactoIdOrName(KeyEventArgs e, TextBox textBox)
 {
     if (e.KeyCode == Keys.Down)
     {
         if (ContactoDataGridView.Rows.Count > 0)
         {
             ContactoDataGridView.Focus();
         }
     }
     if (e.KeyCode == Keys.Escape)
     {
         if (ContactoDataGridView.Rows.Count > 0)
         {
             ContactoDataGridView.Visible = false;
         }
         textBox.Focus();
     }
 }