private void Buscar() { Paciente objPaciente = new Paciente(); if (!int.Equals(cboTipoDocumento.SelectedIndex, 0)) { objPaciente.TipoDocumentoId = Convert.ToByte(cboTipoDocumento.SelectedValue); } objPaciente.NumeroDocumento = txtNumeroDocumento.Text.Trim(); objPaciente.ApellidoPaterno = txtApellidoPaterno.Text.Trim(); objPaciente.ApellidoMaterno = txtApellidoMaterno.Text.Trim(); objPaciente.Nombres = txtNombres.Text.Trim(); dtPacientes = objPacienteBL.GetPacientesBuscadorSelectorPacientes(objPaciente); dgvPacientes.DataSource = dtPacientes; if (dtPacientes.Rows.Count > 0) { dgvPacientes.Visible = true; } else { dgvPacientes.Visible = false; } }