private void limpiarErrores()
 {
     NombreUsuarioerrorProvider.Clear();
     PasserrorProvider.Clear();
     ConfPassTextBox.Clear();
     BuscarerrorProvider.Clear();
 }
        private bool ValidarTextbox()
        {
            if (string.IsNullOrEmpty(UserNameTextBox.Text) && string.IsNullOrEmpty(PassTextBox.Text) && string.IsNullOrEmpty(ConfPassTextBox.Text))
            {
                NombreUsuarioerrorProvider.SetError(UserNameTextBox, "Favor ingresar el nombre de Usuario");
                PasserrorProvider.SetError(PassTextBox, "Favor ingresar la contraseña del usuario");
                ConfPasserrorProvider.SetError(ConfPassTextBox, "Favor confirmar comtraseña");
                MessageBox.Show("Favor llenar todos los campos obligatorios");
            }
            if (string.IsNullOrEmpty(UserNameTextBox.Text))
            {
                NombreUsuarioerrorProvider.SetError(UserNameTextBox, "Favor ingresar el nombre de Usuario");
                return(false);
            }

            if (string.IsNullOrEmpty(PassTextBox.Text))
            {
                NombreUsuarioerrorProvider.Clear();
                PasserrorProvider.SetError(PassTextBox, "Favor ingresar la contraseña del usuario");
                return(false);
            }

            if (string.IsNullOrEmpty(ConfPassTextBox.Text))
            {
                NombreUsuarioerrorProvider.Clear();
                PasserrorProvider.Clear();
                ConfPasserrorProvider.SetError(ConfPassTextBox, "Favor confirmar comtraseña");
                return(false);
            }

            if (ConfPassTextBox.Text != PassTextBox.Text)
            {
                NombreUsuarioerrorProvider.Clear();
                PasserrorProvider.Clear();
                ConfPassTextBox.Clear();
                ConfPasserrorProvider.SetError(ConfPassTextBox, "La contraseña no coincide");
                return(false);
            }



            return(true);
        }