0
I have a bizarre problem, I have a table in the database Sql Server, where there is a field bit, I’m pulling data from this table, which is actually a View.
I do my instruction Select, and executed by SqlDataReader (dr = cmd.ExecuteReader()), when the value Active is false (from C# = 0) it returns the values, but when it comes true of C#, he of error (Input string was not in a correct format). 
I used that same logic on another screen and it works, follows the code of the screens that doesn’t work:
TRANSFERENCE
public class Funcionario : Pessoa
{
    public int id_Func { get; set; }
    public string funcao { get; set; }
    public int id_Gerente { get; set; }
    public bool ativo { get; set; }
    public int id_Loja { get; set; }
}
public class Pessoa
{
    public int id_Pessoa { get; set; }
    public string cpf { get; set; }
    public string nome { get; set; }
    public string sexo { get; set; }
}
BUSINESS
public List<Funcionario> SelecionarFuncionarioPorNome (string nome, bool ativo, int idLoja)
{
        _SQL = @"select 
                Id_Func,NomeFuncionario,Funcao,Cpf,Sexo,id_Gerente,Ativo,idLoja
                from VW_FUNCIONARIO_COMPLETO
                where NomeFuncionario like '%' + @nomefunc + '%' and Ativo = @ativo and idLoja = @idLoja";
        //
        cmd = new SqlCommand();
        cmd.Connection = ConexaoBancoSQLServer.Conectar();
        cmd.Parameters.AddWithValue("@nomefunc", nome);
        cmd.Parameters.AddWithValue("@ativo", ativo);
        cmd.Parameters.AddWithValue("@idLoja", idLoja);
        /*
        cmd.Parameters.Add("@nomefunc", SqlDbType.VarChar, 60).Value = nome;
        cmd.Parameters.Add("@ativo", SqlDbType.Bit, 1).Value = ativo;
        cmd.Parameters.Add("@idLoja", SqlDbType.Int).Value = idLoja;
        */
        cmd.CommandText = _SQL;
        dr = cmd.ExecuteReader();
        List<Funcionario> ListaFuncionarios = new List<Funcionario>();
        while (dr.Read())
        {
            Funcionario func = new Funcionario();
            func.id_Func = int.Parse(dr["Id_Func"].ToString());
            func.nome = dr["NomeFuncionario"].ToString();
            func.funcao = dr["Funcao"].ToString();
            func.cpf = dr["Cpf"].ToString();
            func.sexo = dr["Sexo"].ToString();
            func.id_Gerente = int.Parse(dr["id_Gerente"].ToString());
            func.ativo = Convert.ToBoolean(dr["Ativo"].ToString());
            func.id_Loja = int.Parse(dr["idLoja"].ToString());
            ListaFuncionarios.Add(func);
        }
        return ListaFuncionarios;
}
CANVAS
private void btnPesquisar_Click(object sender, EventArgs e)
{
        try
        {
            bool AtivoDesativo = false;
            if (!rdbDesativado.Checked)
                AtivoDesativo = true;
             if (cmbLoja.Text == "")
                 MessageBox.Show("Escolha uma loja");
            else
                 AtualizarGrid(txtNome.Text, AtivoDesativo, Convert.ToInt32(cmbLoja.SelectedValue));
        }
        catch (Exception ex)
        {
            MessageBox.Show("Erro: " + ex.Message);
        }
}
public void AtualizarGrid(string nome, bool ativo, int idLoja)
{
        List<Funcionario> listaFuncionario = new List<Funcionario>();
        funcionarioNegocio = new FuncionarioNegocio();
        listaFuncionario = funcionarioNegocio.SelecionarFuncionarioPorNome(nome, ativo, idLoja);
        dgvPrincipal.DataSource = null;
        dgvPrincipal.DataSource = listaFuncionario;
        dgvPrincipal.Update();
        dgvPrincipal.Refresh();
}