Example #1
0
        private void txtCedula_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                tec = tec.BuscarTecnico(txtCedula.Text);


                if (tec.cedula != null)
                {
                    txtCedula.Text     = tec.cedula;
                    txtCedula.ReadOnly = Enabled;
                    txtNombre.Text     = tec.nombre;
                    txtCargo.Text      = tec.cargo;
                    cbestado.Text      = tec.estatus;
                }
                else
                {
                    MessageBox.Show("TÉCNICO NO REGISTRADO", "Búsqueda", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }