static DBCenter() { //根据类型,初始化不同的辅助类,和读取连接字符串 string dbtype = ConfigurationManager.AppSettings["DBType"]; if (string.IsNullOrEmpty(dbtype)) { dbtype = "mssql"; } DB = SqlBase.CreateHelper(dbtype); switch (dbtype)//为多数据库读取 { case "oracle": DB.ConnectionString = ConfigurationManager.ConnectionStrings["OraConnection String"].ConnectionString; break; default: DB.ConnectionString = SafeC.Cert_Decry(ConfigurationManager.ConnectionStrings["Connection String"].ConnectionString); break; } }
protected void Decry_Btn_Click(object sender, EventArgs e) { try { After_T.Text = SafeC.Cert_Decry(Before_T.Text.Trim()); } catch (Exception ex) { After_T.Text = ex.Message; } }