public void CarregarEvolucoes(int CodigoClinica)
        {
            Evolucao Evolucao = new Evolucao();

            this.Evolucoes = new List <Evolucao>();

            this.Evolucoes = Evolucao.ObterEvolucoesPorProntuario(this.Paciente.Codigo, CodigoClinica);
        }
        public void Cadastrar(Evolucao e, int CodigoClinica)
        {
            using (FbConnection Con = new FbConnection(Firebird.StringConexao))
            {
                try
                {
                    Con.Open();

                    DateTime DataHoraAtual = Firebird.DataHoraServidor();

                    string TxtSQL = @"  INSERT
                                        INTO
                                        EVOLUCAO
                                        (
                                            E_CODIGO,
                                            E_PRONTUARIO,
                                            E_DESCRICAO,
                                            E_DATAEVOLUCAO,
                                            E_HORAEVOLUCAO,
                                            E_DATAGRAVACAO,
                                            E_HORAGRAVACAO,
                                            E_PROFISSIONAL,
                                            E_CLINICA
                                        )
                                        VALUES
                                        (
                                            @E_CODIGO,
                                            @E_PRONTUARIO,
                                            @E_DESCRICAO,
                                            @E_DATAEVOLUCAO,
                                            @E_HORAEVOLUCAO,
                                            @E_DATAGRAVACAO,
                                            @E_HORAGRAVACAO,
                                            @E_PROFISSIONAL,
                                            @E_CLINICA
                                        )";

                    using (FbCommand cmdInsert = new FbCommand(TxtSQL, Con))
                    {
                        cmdInsert.Parameters.AddWithValue("E_CODIGO", GerarCodigo());
                        cmdInsert.Parameters.AddWithValue("E_PRONTUARIO", e.CodigoProntuario);
                        cmdInsert.Parameters.AddWithValue("E_DESCRICAO", e.Descricao);
                        cmdInsert.Parameters.AddWithValue("E_DATAEVOLUCAO", e.DataHoraEvolucao.Date);
                        cmdInsert.Parameters.AddWithValue("E_HORAEVOLUCAO", e.DataHoraEvolucao.TimeOfDay);
                        cmdInsert.Parameters.AddWithValue("E_DATAGRAVACAO", DataHoraAtual.Date);
                        cmdInsert.Parameters.AddWithValue("E_HORAGRAVACAO", DataHoraAtual.TimeOfDay);
                        cmdInsert.Parameters.AddWithValue("E_PROFISSIONAL", e.Profissional.Codigo);
                        cmdInsert.Parameters.AddWithValue("E_CLINICA", CodigoClinica);

                        cmdInsert.ExecuteNonQuery();
                    }
                }
                finally
                {
                    Con.Close();
                }
            }
        }