예제 #1
0
    private DataTable VerifyLogin(string pSUSR, string pSUSR_PASSWORD)
    {
        DataTable lTable = new DataTable();
        DataSet lTableSet = new DataSet();
        APB.Mercury.DataObjects.DefNet.DataBaseOra objDB = new APB.Mercury.DataObjects.DefNet.DataBaseOra();
        objDB.conexao = ConfigurationManager.ConnectionStrings[ConfigurationManager.AppSettings["ActiveConnectionString"]].ToString();

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

        objDB.sql = " SELECT  SUSR_ID, SUSR_NAME, SUSR_LOGIN, PES_ID, SUSR_PASSWORD, SUSR_REGDATE, SUSR_REGUSR, SUSR_STATUS from SystemUser";
        objDB.sql += " WHERE SUSR_LOGIN = '******' AND SUSR_PASSWORD = '******' ";
        objDB.sql += " AND SUSR_STATUS='A' ";

        objDB.cmd = new System.Data.OracleClient.OracleCommand(objDB.sql, objDB.conn);
        lTableSet = objDB.ExecutaDataSet(objDB.cmd);
        lTable = (DataTable)lTableSet.Tables[0];

        return lTable;
    }
예제 #2
0
    private DataTable GetFun_SetByUsr_ID(string pSUSR_ID)
    {
        DataTable lTable = new DataTable();
        DataSet lTableSet = new DataSet();
        APB.Mercury.DataObjects.DefNet.DataBaseOra objDB = new APB.Mercury.DataObjects.DefNet.DataBaseOra();
        objDB.conexao = ConfigurationManager.ConnectionStrings[ConfigurationManager.AppSettings["ActiveConnectionString"]].ToString();

        objDB.sql = "  SELECT A.SUSR_ID, B.PES_NOME, D.SET_ID, E.FUNC_DESC,c.pesf_id, D.SET_DESCRICAO, N.NUC_DESCRICAO,B.PES_ID ";
        objDB.sql += " FROM SYSTEMUSER A, PESSOA B, PESSOAFUNCAO C, SETOR D, FUNCAO E, NUCLEO N ";
        objDB.sql += @" 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 ";
        objDB.sql += " AND A.SUSR_STATUS = 'A' AND A.SUSR_ID = " + pSUSR_ID + " ";

        objDB.cmd = new System.Data.OracleClient.OracleCommand(objDB.sql, objDB.conn);
        lTableSet = objDB.ExecutaDataSet(objDB.cmd);
        lTable = (DataTable)lTableSet.Tables[0];

        return lTable;
    }