private void btnGuardar_Click(object sender, EventArgs e) { if (txtUsuario.Text != "" && txtContraseña.Text != "" && (rbAdministrador.Checked || rbTrabajador.Checked)) { if (rbTrabajador.Checked) { tipoU = 2; } if (rbAdministrador.Checked) { tipoU = 1; } Loguear.agregarUsuario(txtUsuario.Text, txtContraseña.Text, tipoU); c.cargarInicioSesion(dgvInicio); limpiar(); } else { MessageBox.Show("Debe llenar todos los campos para agregar un nuevo usuario", "Nuevo Usuario", MessageBoxButtons.OK); } }