Example #1
0
        /// <summary>
        /// 初始化,默认key="SqlDSN"
        /// </summary>
        public SQLServer()
        {
            this.privateParameterList = new ArrayList();

            this.privateModuleName = this.GetType().ToString();
            SqlstringName          = System.Configuration.ConfigurationManager.AppSettings["ESysName"];
            //this.privateConnectionString = SecurityService.SymmetricDecrypt(ConfigurationManager.AppSettings["SqlDSN"]);
            setstring = "";
            if (SqlstringName == "GuaTang")
            {
                aa        = ConfigurationManager.AppSettings["GuaTang"];
                setstring = SecurityService.SymmetricDecrypt(aa);
                this.privateConnectionString = setstring;
            }
            //除湿
            if (SqlstringName == "JASHI_CM")
            {
                aa        = ConfigurationManager.AppSettings["JASHI_CM"];
                setstring = SecurityService.SymmetricDecrypt(aa);
                privateConnectionString = setstring;
            }
            if (SqlstringName == "KongTiao")
            {
                aa        = ConfigurationManager.AppSettings["KongTiao"];
                setstring = SecurityService.SymmetricDecrypt(aa);
                this.privateConnectionString = setstring;
            }
            if (SqlstringName == "DianFengShan")
            {
                aa        = ConfigurationManager.AppSettings["DianFengShan"];
                setstring = SecurityService.SymmetricDecrypt(aa);
                this.privateConnectionString = setstring;
            }
        }
Example #2
0
 /// <summary>
 /// 取出Access的连接
 /// </summary>
 /// <param name="AppSettings"></param>
 public SQLServer(string AppSettings, string AccessDate)
 {
     this.privateParameterList    = new ArrayList();
     this.privateModuleName       = this.GetType().ToString();
     this.privateConnectionString = SecurityService.SymmetricDecrypt(ConfigurationManager.AppSettings[AppSettings]) + HttpContext.Current.Server.MapPath(SecurityService.SymmetricDecrypt(ConfigurationManager.AppSettings[AccessDate]));
 }
Example #3
0
 /// <summary>
 /// 取出不同SQL的连接key为自定义
 /// </summary>
 /// <param name="AppSettings"></param>
 public SQLServer(string AppSettings)
 {
     this.privateParameterList    = new ArrayList();
     this.privateModuleName       = this.GetType().ToString();
     this.privateConnectionString = SecurityService.SymmetricDecrypt(ConfigurationManager.AppSettings[AppSettings]);
 }