public static DataTable GetSituacaoEscolarByPessoa(
            decimal pPES_ID,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = SituacaoEscolarQD.qSituacaoEscolarList;
            lQuery += string.Format(" WHERE STESC_STATUS='A' AND PES_ID = {0}", pPES_ID);

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetAllNOTICIAS(                                                           
             ConnectionInfo pInfo                                    
         )
        {
            string lQuery = "";
             DataTable lTable = new DataTable();

             lQuery = NOTICIASQD.qNOTICIASList;
             lQuery += " WHERE NOT_STATUS='A' AND NOT_TIPO=0 ORDER BY NOT_REGDATE DESC";

             OracleDo lOracleDo = new OracleDo();

             lTable = lOracleDo.Consulta(lQuery, pInfo.ConnectionString);

             return lTable;
        }
        public static DataTable GetFun_SetByUsr_ID(ConnectionInfo pInfo, Decimal pSUSR_ID)
        {
            string lQuery = "";

            DataTable lTable = new DataTable();

            lQuery = SystemUserQD.qSystemUserList1;
            lQuery += @" WHERE A.PES_ID = B.PES_ID
                         AND B.PES_ID = C.PES_ID
                         AND C.PESF_STATUS = 'A'
                         AND C.SET_ID = D.SET_ID
                         and N.NUC_ID = D.NUC_ID
                         AND C.FUNC_ID = E.FUNC_ID ";
            lQuery += String.Format(" AND A.SUSR_STATUS = 'A' AND A.SUSR_ID = {0}", pSUSR_ID);

            OracleDo lOracleDo = new OracleDo();

            lTable = lOracleDo.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetPessoaFuncaoServidorByCondicao(
            string lCondicao,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = PessoaFuncaoQD.qPessoaFuncaoServidores;
            lQuery += lCondicao;
            lQuery += " ORDER BY PES.PES_NOME";

            //SelectCommand lSelect = new SelectCommand(lQuery);
            //lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetSequenciaEscalaAtendimentoByNucleoAreaData(
            decimal pNUC_ID,
            decimal pATUA_ID,
            string pData,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = EscalaQD.qEscalaDefensor;
            lQuery += string.Format(" AND NUCARATUA.NUC_ID = {0} AND ESC.ESC_DIA = '{1}'", pNUC_ID, pData);
            lQuery += string.Format(@" AND   NUCARATUA.ARATUA_ID = (SELECT NA.ARATUA_ID FROM NUCLEOXAREAATUACAO NA, ATUACAO ATU
                             WHERE NA.NUCARATUA_ID = ATU.NUCARATUA_ID
                             AND NA.NUCARATUA_STATUS = 'A'
                             AND ATU.ATUA_ID = {0})", pATUA_ID);
            lQuery += " ORDER BY ESC.ESC_SEQUENCIA";

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetEscalaByNucleoDia(
            decimal pNUC_ID,
            string pESC_DIA,
            decimal pARATUA_ID,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = EscalaQD.qEscalaAll;
            lQuery += string.Format(" AND ESC.ESC_DIA = '{0}'", pESC_DIA);
            lQuery += string.Format(" AND NUCARATUA.NUC_ID = {0}", pNUC_ID);
            lQuery += string.Format(" AND NUCARATUA.ARATUA_ID = {0}", pARATUA_ID);
            lQuery += " ORDER BY PES.PES_NOME";

            //SelectCommand lSelect = new SelectCommand(lQuery);
            //lSelect.Fields.Add(EscalaQD._ESC_DIA.Name, pESC_DIA, (ItemType)EscalaQD._ESC_DIA.DBType);
            //lSelect.Fields.Add(NucleoxAreaAtuacaoQD._NUC_ID.Name, pNUC_ID, (ItemType)NucleoxAreaAtuacaoQD._NUC_ID.DBType);
            //lSelect.Fields.Add(NucleoxAreaAtuacaoQD._ARATUA_ID.Name, pARATUA_ID, (ItemType)NucleoxAreaAtuacaoQD._ARATUA_ID.DBType);
            //lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetNucleoByBairroCidadePessoaPreferencial129(
            decimal pPES_ID,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = string.Format(NucleoQD.qNucleoLocalidadePreferencial, pPES_ID);

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetAtuacaoAtivaByPESF_ID(
            decimal pPESF_ID,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = AtuacaoQD.qAtuacaoPessoa;
            lQuery += string.Format(" AND ATUA.PESF_ID = {0} AND ATUA.ATUA_STATUS = 'A' ", pPESF_ID);

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetNomeSetor(
            ConnectionInfo pInfo,
            String pSET_ID
            )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = SETORQD.qNomeSetor;
            lQuery += @" WHERE SET_STATUS = 'A'
                        AND SET_ID = " + pSET_ID;

            OracleDo lOracleDo = new OracleDo();

            lTable = lOracleDo.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetPessoaAtendimentoByCondicao(
            string pCondicao,
            ConnectionInfo pInfo
        )
        {
            Select.AlterSessionBinary(pInfo);

            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = PessoaQD.qPessoaAtendimentoList;
            lQuery += pCondicao;
            lQuery += " ORDER BY PES.PES_NOME";

            //08/11/2012 - Ricardo Almeida
            //SelectCommand lSelect = new SelectCommand(lQuery);
            //lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }
        public static DataTable GetParentePessoaByID(
            decimal pPES_ID,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = string.Format(PessoaQD.qPessoaParente, pPES_ID);

            OracleDo lOra = new OracleDo();
            lTable = lOra.Consulta(lQuery, pInfo.ConnectionString);

            return lTable;
        }