public static bool ConnectCJDB(string ip, string port, string database, string username, string password, string type) { switch (type.ToLower()) { case "oracle": DBHelperCJ = new OracleHelper(); break; case "sqlserver": default: DBHelperCJ = new SqlserverHelper(); break; } DBHelperCJ.SetConnInfoString(ip, port, database, username, password); return DBHelperCJ.TestConnect(); }