示例#1
0
 public bool RegisterUserLoginEntry(string systemCode, string userId)
 {
     using (var conn = OracleUtility.NewConnection(ssoMaoConnectionstring))
     {
         var spParameters = new OracleDynamicParameters();
         spParameters.Add("p_system_code", systemCode);
         spParameters.Add("p_user_id", userId);
         return(conn.Execute("ssomao.pr_ssomao_set_user_login_hist", param: spParameters, commandType: System.Data.CommandType.StoredProcedure) > 0);
     }
 }
示例#2
0
 public static string GetOracleServerIP()
 {
     try
     {
         using (var conn = OracleUtility.NewConnection())
         {
             var ip = OracleUtility.ExecuteScalar <string>("SELECT MAX(HOST_NAME) FROM v$instance", null, conn) == null ? "127.0.0.1" : OracleUtility.ExecuteScalar <string>("SELECT MAX(HOST_NAME) FROM v$instance", null, conn);
             return(ip);
         }
     }
     catch
     {
         return(null);
     }
 }