private void RaSoTB_Validated(object sender, EventArgs e) { if (RaSoTB.Text.Trim() == "") { ProveedorEP.SetError(RaSoTB, "Ingrese la Razón social..."); RaSoTB.Focus(); } }
public void habilitar(String unUsuario) { conexion.Open(); SqlCommand comando3 = new SqlCommand("UPDATE LOS_BORBOTONES.Usuario SET Habilitado = 1 WHERE User_name = @usuario", conexion); comando3.Parameters.AddWithValue("@usuario", unUsuario); int cant; cant = comando3.ExecuteNonQuery(); if (cant == 1) { MessageBox.Show("El usuario ha sido habilitado..."); } conexion.Close(); seleccionar(ProvBorradoCB); RaSoTB.Clear(); }