AerolineaFrba.Abm_Rol.Alta.ExisteNombreRol C# (CSharp) Method

ExisteNombreRol() private method

private ExisteNombreRol ( ) : bool
return bool
        private bool ExisteNombreRol()
        {
            SqlCommand command = new SqlCommand();
            command.Connection = Program.conexion();
            command.CommandType = System.Data.CommandType.Text;
            command.CommandText = "SELECT ABSTRACCIONX4.ExisteNombreRol(@Nombre)";
            command.CommandTimeout = 0;

            command.Parameters.AddWithValue("@Nombre", txtNombre.Text);

            return (Boolean)command.ExecuteScalar();
        }