Exemplo n.º 1
0
        public static DataTable GetAllEscalaMesAtuacao(
            ConnectionInfo pInfo,
            String pESC_DIA,
            decimal pATUA_ID
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = EscalaQD.qEscalaAtividadeList;
            lQuery += " WHERE ESC_STATUS NOT IN ('I','E') ";
            lQuery += " AND A.ATDEF_ID = B.ATDEF_ID ";
            lQuery += string.Format(" AND A.{0} = >>{0} ", EscalaQD._ATUA_ID.Name);
            lQuery += string.Format(" AND to_char(A.{0}, 'mm') = to_char(>>{0}, 'mm')", EscalaQD._ESC_DIA.Name);
            lQuery += string.Format(" AND to_char(A.{0}, 'yyyy') = to_char(>>{0}, 'yyyy')", EscalaQD._ESC_DIA.Name);
            lQuery += "Order By ESC_DIA ";

            SelectCommand lSelect = new SelectCommand(lQuery);

            lSelect.Fields.Add(EscalaQD._ATUA_ID.Name, pATUA_ID, (ItemType)EscalaQD._ATUA_ID.DBType);
            lSelect.Fields.Add(EscalaQD._ESC_DIA.Name, pESC_DIA, (ItemType)EscalaQD._ESC_DIA.DBType);
            lSelect.Fields.Add(EscalaQD._ESC_DIA.Name, pESC_DIA, (ItemType)EscalaQD._ESC_DIA.DBType);

            lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

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

             lQuery = DeterminacaoSecretariaQD.qDeterminacaoSecretariaList;
             lQuery += string.Format(" WHERE DTMSEC_STATUS='A' AND {0} = >>{0}", DeterminacaoSecretariaQD._NUC_ID.Name);

             if (pPESF_ID != 0)
                 lQuery += string.Format(" AND DTMSEC_PESF_PEDIDO = {0}", pPESF_ID);

             if (pDTMSEC_SITUACAO != 0)
                 lQuery += string.Format(" AND DTMSEC_SITUACAO = {0}", pDTMSEC_SITUACAO);

             lQuery += " ORDER BY DTMSEC_ID";

             SelectCommand lSelect = new SelectCommand(lQuery);

             lSelect.Fields.Add(DeterminacaoSecretariaQD._NUC_ID.Name, pNUC_ID, (ItemType)DeterminacaoSecretariaQD._NUC_ID.DBType);

             lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

             return lTable;
        }
Exemplo n.º 3
0
        public static LoginUserDo VerifyLogin(string pEUSR, string pEusr_Password, string pEusr_Type, ConnectionInfo pConnectionInfo)
        {
            bool lReturn;
            string lQuery;
            DataTable lTable;

            lQuery = UsersQD.qUsersList;
            lTable = new DataTable();

            if (pEusr_Type == "1")//Portal Garagem
            {
                lQuery += String.Format(" WHERE {0} = >>{0} AND {1} = >>{1} ", UsersQD._USR_LOGIN.Name, UsersQD._USR_PASSWORD.Name);
                lQuery += " AND USR_STATUS='A' ";

                SelectCommand lSelect = new SelectCommand(lQuery);

                pEusr_Password = APB.Framework.Encryption.Crypto.Encode(pEusr_Password);

                lSelect.Fields.Add(UsersQD._USR_LOGIN.Name, pEUSR, (ItemType)UsersQD._USR_LOGIN.DBType);
                lSelect.Fields.Add(UsersQD._USR_PASSWORD.Name, pEusr_Password, (ItemType)UsersQD._USR_PASSWORD.DBType);

                lTable = lSelect.ReturnData(Instance.CreateDatabase(pConnectionInfo));
            }

            lReturn = (lTable.Rows.Count > 0) ? true : false;

            // User Accept, Check TP_ID
            if (lReturn)
            {
                return new LoginUserDo((decimal)lTable.Rows[0]["USR_ID"], (string)lTable.Rows[0]["USR_LOGIN"]);
            }

            return null;
        }
Exemplo n.º 4
0
        public static DataTable AutenticacaoNpj(ConnectionInfo pConnectionInfo, string pSusr_Login, string pSusr_Senha)
        {
            DataTable lTable = new DataTable();
            string lQuery = "";

            pSusr_Senha = APB.Framework.Encryption.Crypto.Encode(pSusr_Senha);

            lQuery = SystemUserQD.qAutenticacaoNpj;
            lQuery += String.Format(" WHERE {0} = >>{0} AND {1} = >>{1} ", SystemUserQD._SUSR_LOGIN.Name, SystemUserQD._SUSR_PASSWORD.Name);
            lQuery += " AND A.PES_ID = B.PES_ID ";
            lQuery += " AND B.PES_ID = C.PES_ID ";
            lQuery += " AND C.PESF_STATUS = 'A' ";
            lQuery += " AND A.SUSR_STATUS = 'A' ";
            lQuery += " AND C.SET_ID = D.SET_ID ";
            lQuery += " AND N.NUC_ID = D.NUC_ID ";
            lQuery += " AND N.NUC_ID = SN.NUC_ID ";
            lQuery += " AND A.SUSR_ID = SN.SUSR_ID ";
            lQuery += " AND C.FUNC_ID = E.FUNC_ID ";

            SelectCommand lSelect = new SelectCommand(lQuery);

            lSelect.Fields.Add(SystemUserQD._SUSR_LOGIN.Name, pSusr_Login, (ItemType)SystemUserQD._SUSR_LOGIN.DBType);
            lSelect.Fields.Add(SystemUserQD._SUSR_PASSWORD.Name, pSusr_Senha, (ItemType)SystemUserQD._SUSR_PASSWORD.DBType);

            lTable = lSelect.ReturnData(Instance.CreateDatabase(pConnectionInfo));

            return lTable;
        }
        public static DataTable GetCountProcessoTamitacaoPedente(
            decimal pCategoria,
            string pLoginName,
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            if (pCategoria == (decimal)Categoria.Tramitação)
                lQuery = DocumentoTramitacaoQD.qCountTramitacaoProcesso;
            else if (pCategoria == (decimal)Categoria.TramitaçãoPetição)
                lQuery = DocumentoTramitacaoQD.qCountTramitacaoPeticao;
            else if (pCategoria == (decimal)Categoria.TramitaçãoProcessoExterno)
                lQuery = DocumentoTramitacaoQD.qCountTramitacaoProcessoExterno;
            else if (pCategoria == (decimal)Categoria.TramitaçãoOfício)
                lQuery = DocumentoTramitacaoQD.qCountTramitacaoOficio;

            lQuery += " AND DOC.DOC_REGUSER = '******' ";
            lQuery += " AND  DOCTRAM.nuc_dest_id is null ";

            //SelectCommand lSelect = new SelectCommand(lQuery);

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

            OracleDo lOra = new OracleDo();

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

            return lTable;
        }
Exemplo n.º 6
0
        public static DataTable GetAllTipoPessoa(
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = PessoaQD.qTipoPessoa;

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

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

             lQuery = NucleoxLocalidadeQD.qNucleoxLocalidadeList;

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

             return lTable;
        }
Exemplo n.º 8
0
        public static DataTable GetAllSector(ConnectionInfo pInfo)
        {
            string lQuery = "";
             DataTable lTable = new DataTable();

             lQuery = sectorQD.qsectorList;
             lQuery += " WHERE SECT_STATUS = 'A'";

             SelectCommand lSelect = new SelectCommand(lQuery);

             lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

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

            lQuery = InformationSchemaQd.qAllTables;
            lQuery += " ORDER BY TABLE_NAME";

            SelectCommand lSelect = new SelectCommand(lQuery);

            lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

            return lTable;
        }
        public static DataTable GetAllColumn(string pTABLE_NAME, ConnectionInfo pInfo)
        {
            string lQuery = "";
            DataTable lTable;

            lQuery = string.Format(InformationSchemaQd.qAllColumn, pTABLE_NAME);
            lQuery += " ORDER BY COLUMN_NAME";

            SelectCommand lSelect = new SelectCommand(lQuery);

            lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

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

             lQuery = RelatorioAtualizacaoQD.qRelatorioAtualizacaoList;
             lQuery += " WHERE RLT_STATUS='A'";

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

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

            lQuery = DocumentoxAssuntoPsicossocialQD.qDocumentoxAssuntoPsicossocialList;
            lQuery += " WHERE DOCASSPS_STATUS='A'";

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

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

            lQuery = ALUNOXATENDIMENTONPJQD.qUsuariosNpj;
            lQuery += " WHERE UG.GRP_ID = 1";
            lQuery += " ORDER BY PES.PES_NOME ";

            SelectCommand lSelect = new SelectCommand(lQuery);

            lTable = lSelect.ReturnData(Instance.CreateDatabase(pInfo));

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

            lQuery = DocumentosApresentadosQD.qDocumentosApresentadosList;
            lQuery += " WHERE DOCAP_STATUS NOT IN ('I','E') ";

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

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

            lQuery = VisitasSocioEducativasQD.qVisitasSocioEducativasList;
            lQuery += " WHERE VTSCE_STATUS='A'";

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

            return lTable;
        }
Exemplo n.º 16
0
        public static DataTable GetAllEEProcedimento(                                                           
             ConnectionInfo pInfo                                    
         )
        {
            string lQuery = "";
             DataTable lTable = new DataTable();

             lQuery = EEProcedimentoQD.qEEProcedimentoList;
             lQuery += " WHERE EEPCD_STATUS='A' ORDER BY EEPCD_DESCRICAO";

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

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

            lQuery = DocumentoxEEDestinoQD.qDocumentoxEEDestinoList;
            lQuery += " WHERE DOCEEDST_STATUS='A'";

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

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

            lQuery = CalendarioJuridicoQD.qCalendarioJuridicoList;
            lQuery += " WHERE CLDJ_STATUS='A' ORDER BY CLDJ_DIA";

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

            return lTable;
        }
Exemplo n.º 19
0
        public static DataTable GetAllPessoa(
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = PessoaQD.qPessoaList;
            lQuery += " WHERE PES_STATUS NOT IN ('I','E')";

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

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

             lQuery = TipoInteressadoQD.qTipoInteressadoList;
             lQuery += " WHERE TINT_STATUS='A' ORDER BY TINT_ID";

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

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

            lQuery = AudienciaFuturaQD.qAudienciaFuturaList;
            lQuery += " WHERE AUDF_STATUS='A'";

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

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

             lQuery = SecurityObjectsQD.qSecurityObjectsList;
             lQuery += " WHERE SO_STATUS='A' ORDER BY SO_OBJECTID";

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

             return lTable;
        }
Exemplo n.º 23
0
        public static DataTable GetAllVara(                                                           
             ConnectionInfo pInfo                                    
         )
        {
            string lQuery = "";
             DataTable lTable = new DataTable();

             lQuery = VaraQD.qVaraList;
             lQuery += " WHERE VAR_STATUS='A' ORDER BY VAR_DESC";

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

             return lTable;
        }
Exemplo n.º 24
0
        public static DataTable GetAllUnidadeFederativa(
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = PessoaQD.qUnidadeFederativa;
            lQuery += " WHERE UF_STATUS='A'";

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

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

            lQuery = UnidadeVaraInfracionalQD.qUnidadeVaraInfracionalDescricao;
            lQuery += " WHERE UVI_STATUS='A'";

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

            return lTable;
        }
Exemplo n.º 26
0
        public static DataTable GetAllTipoOficio(
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = TipoOficioQD.qTipoOficioList;
            lQuery += " WHERE TPOFC_STATUS='A'";

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

            return lTable;
        }
Exemplo n.º 27
0
        public static DataTable GetAllCasaPenal(
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = CasaPenalQD.qCasaPenalList;
            lQuery += " WHERE CSP_STATUS='A' ORDER BY CSP_DESCRICAO";

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

            return lTable;
        }
Exemplo n.º 28
0
        public static DataTable GetTipoOficioModeloAll(
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = TipoOficioQD.qTipoOficio;
            lQuery += " WHERE TPOFC.TPOFC_STATUS='A' ORDER BY TPOFC.TPOFC_DESCRICAO";

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

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

            lQuery = AssuntoProcessualQD.qAssuntoProcessualList;
            lQuery += " WHERE ASSPRC_STATUS='A'";

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

            return lTable;
        }
Exemplo n.º 30
0
        public static DataTable GetAllConciliacao(
            ConnectionInfo pInfo
        )
        {
            string lQuery = "";
            DataTable lTable = new DataTable();

            lQuery = ConciliacaoQD.qConciliacaoList;
            lQuery += " WHERE CONC_STATUS NOT IN ('I','E')";

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

            return lTable;
        }