Пример #1
0
        public static Boolean CheckDBAccessSet()
        {
            Boolean blnRet = false;
            RegistryEdit objRegistryEdit = new RegistryEdit("TEC.FHIOL");
            if (objRegistryEdit.Read("s") != null && objRegistryEdit.Read("s") != "" &&
                objRegistryEdit.Read("d") != null && objRegistryEdit.Read("d") != "" &&
                objRegistryEdit.Read("u") != null && objRegistryEdit.Read("u") != "" &&
                objRegistryEdit.Read("p") != null && objRegistryEdit.Read("p") != "")
                blnRet = true;
            return blnRet;

        }
Пример #2
0
        public static Boolean CheckDBAccess()
        {
            Boolean blnRet = false;
            RegistryEdit objRegistryEdit = new RegistryEdit("TEC.FHIOL");

            String DBServer = objRegistryEdit.Read("cam_s");
            String DBName = objRegistryEdit.Read("cam_d");
            String DBUser = objRegistryEdit.Read("cam_u");
            String DBPassword = objRegistryEdit.Read("cam_p");

            if (CheckDBConnection(CryptoEngine.Decrypt(DBServer), CryptoEngine.Decrypt(DBName), CryptoEngine.Decrypt(DBUser), CryptoEngine.Decrypt(DBPassword)))
                blnRet = true;
            return blnRet;
        }
Пример #3
0
 public static Boolean SetDBAccess(String DBServer, String DBName, String DBUser, String DBPassword)
 {
     Boolean blnRet = false;
     RegistryEdit objRegistryEdit = new RegistryEdit("Campus");
     if (objRegistryEdit.Write("cam_s", CryptoEngine.Encrypt(DBServer)))
         if (objRegistryEdit.Write("cam_d", CryptoEngine.Encrypt(DBName)))
             if (objRegistryEdit.Write("cam_u", CryptoEngine.Encrypt(DBUser)))
                 if (objRegistryEdit.Write("cam_p", CryptoEngine.Encrypt(DBPassword)))
                     blnRet = true;
     return blnRet;
 }