private void txtPesquisaServ_TextChanged(object sender, EventArgs e) { ServicoDAO servicoDAO = new ServicoDAO(); List <Servico> servicos; if (txtPesquisaServ.Text != "") { servicos = servicoDAO.Listar(txtPesquisaServ.Text); dgvServP.Rows.Clear(); foreach (Servico s in servicos) { dgvServP.Rows.Add(s.Codigo, s.CpfCliente1, s.PlacaCarro1, s.CpfFuncionario1, s.ValorTotal); } } }