public PrescricaoEnfermagemColecao ConsultarPrescricoesEnfermagemAFazer(string idpaciente)
        {
            try
            {
                PrescricaoEnfermagemColecao prescricaoEnfermagemColecao = new PrescricaoEnfermagemColecao();
                acessoDadosSqlServer.LimparParametros();
                acessoDadosSqlServer.AdicionarParametros("@IdPaciente", idpaciente);
                DataTable datatablePrescricaoEnfermagem = acessoDadosSqlServer.ExecutarConsulta(CommandType.StoredProcedure, "uspPrescricaoEnfermagemAFazerPesquisar");

                foreach (DataRow linha in datatablePrescricaoEnfermagem.Rows)
                {
                    PrescricaoEnfermagem prescricaoEnfermagemClass = new PrescricaoEnfermagem();

                    prescricaoEnfermagemClass.IdPrescricaoEnfermagem = Convert.ToInt32(linha["IdPrescricaoEnfermagem"]);
                    prescricaoEnfermagemClass.IdPessoa = Convert.ToInt32(linha["IdPaciente"]);
                    prescricaoEnfermagemClass.Tipo = Convert.ToString(linha["Tipo"]);
                    prescricaoEnfermagemClass.Descricao = Convert.ToString(linha["Descricao"]);
                    prescricaoEnfermagemClass.Horario = Convert.ToDateTime(linha["Horario"]);
                    //prescricaoMedicaClass.TarefaRealizada = Convert.ToBoolean(linha["TarefaRealizada"]);
                    prescricaoEnfermagemClass.NomeEnfermeiro = Convert.ToString(linha["NomeEnfermeiro"]);
                    prescricaoEnfermagemClass.HoraRealizacaoTarefa = Convert.ToString(linha["HoraRealizacaoTarefa"]);
                    prescricaoEnfermagemClass.DataCadastro = Convert.ToDateTime(linha["DataCadastro"]);
                    prescricaoEnfermagemClass.DataModificacao = Convert.ToDateTime(linha["DataModificacao"]);

                    prescricaoEnfermagemColecao.Add(prescricaoEnfermagemClass);
                }
                return prescricaoEnfermagemColecao;
            }
            catch (Exception ex)
            {
                throw new Exception("Não foi possível pesquisar. Detalhes " + ex.Message);
            }
        }
 private void AtualizarGridPrescricaoEnfermagemRealizadas()
 {
     PrescricaoEnfermagemNegocio prescricaoEnfermagemNegocio = new PrescricaoEnfermagemNegocio();
     PrescricaoEnfermagemColecao prescricaoEnfermagemColecao = new PrescricaoEnfermagemColecao();
     prescricaoEnfermagemColecao = prescricaoEnfermagemNegocio.ConsultarPrescricoesEnfermagemRealizadas(idpaciente);
     GridViewPrescricaoEnfermagemRealizadas.DataSource = prescricaoEnfermagemColecao;
     GridViewPrescricaoEnfermagemRealizadas.DataBind();
 }