private void Button_Click_8(object sender, RoutedEventArgs e) { DataOperations01 LDataOperation = new DataOperations01(); DatabaseOperation01Return LDBOperationReturn = new DatabaseOperation01Return(); //LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(3, "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.4.182) (PORT=1521)))(CONNECT_DATA=(SERVICE_NAME= PFOrcl)));User Id=PFDEV; Password=PF,123", 11, 901, "00000", DateTime.UtcNow.ToString("yyyyMMddHHmmss")); LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(2, "Data Source=192.168.4.186,1433;Initial Catalog=UMPDataDB;User Id=PFDEV;Password=PF,123", 11, 901, "00000", DateTime.UtcNow.ToString("yyyyMMddHHmmss")); }
private long GetSerialIDByType(int AIntDBType, string AStrDBProfile, string AStrRentToken, int AIntModule, int AIntType) { long LLongSerialID = 0; try { DatabaseOperation01Return LDatabaseOperation01Return = new DatabaseOperation01Return(); DataOperations01 LDataOperations01 = new DataOperations01(); LDatabaseOperation01Return = LDataOperations01.GetSerialNumberByProcedure(AIntDBType, AStrDBProfile, AIntModule, AIntType, AStrRentToken, "20140101000000"); if (!LDatabaseOperation01Return.BoolReturn) { LLongSerialID = 0; } else { LLongSerialID = long.Parse(LDatabaseOperation01Return.StrReturn); } } catch { LLongSerialID = 0; } return LLongSerialID; }
private long GetSerialIDByType(List<string> AListStringArgs, int AIntModule, int AIntType) { long LLongSerialID = 0; try { DatabaseOperation01Return LDatabaseOperation01Return = new DatabaseOperation01Return(); DataOperations01 LDataOperations01 = new DataOperations01(); LDatabaseOperation01Return = LDataOperations01.GetSerialNumberByProcedure(int.Parse(AListStringArgs[0]), AListStringArgs[1], AIntModule, AIntType, AListStringArgs[2], "20140101000000"); if (!LDatabaseOperation01Return.BoolReturn) { LLongSerialID = 0; } else { LLongSerialID = long.Parse(LDatabaseOperation01Return.StrReturn); } } catch { LLongSerialID = 0; } return LLongSerialID; }
private long GetSerialIDByType(string AStrC000, int AIntDBType, string AStrDBProfile, string AStrRentToken, int AIntModule, int AIntType, string AStrTime) { long LLongSerialID = 0; try { DatabaseOperation01Return LDatabaseOperation01Return = new DatabaseOperation01Return(); DataOperations01 LDataOperations01 = new DataOperations01(); LDatabaseOperation01Return = LDataOperations01.GetSerialNumberByProcedure(AIntDBType, AStrDBProfile, AIntModule, AIntType, AStrRentToken, AStrTime); if (!LDatabaseOperation01Return.BoolReturn) { LLongSerialID = 0; } else { LLongSerialID = long.Parse(LDatabaseOperation01Return.StrReturn); } //WriteEntryLog("GetSerialIDByType()\n" + LDatabaseOperation01Return.StrReturn, EventLogEntryType.Warning); } catch (Exception ex) { LLongSerialID = 0; WriteEntryLog("GetSerialIDByType()\nC000 = " + AStrC000 + "\nTime = " + AStrTime + "\n" + ex.ToString(), EventLogEntryType.Error); } return LLongSerialID; }
/// <summary> /// 写入操作日志 /// </summary> /// <param name="AListStrOperationInfo"> /// 0:客户端SessionID /// 1:模块ID 2:功能操作编号 3:租户Token(5位) 4:操作用户ID /// 5:当前操作角色 6:机器名 7:机器IP 8:操作时间 UTC /// 9:操作结果 10:操作内容对应的语言包ID 11:替换参数 12:异常错误 /// </param> /// <param name="AStrReturnCode"></param> /// <param name="AStrReturnMessage"></param> /// <returns></returns> public bool S01BOperation01(List <string> AListStrOperationInfo, ref string AStrReturnCode, ref string AStrReturnMessage) { bool LBoolReturn = true; string LStrVerificationCode004 = string.Empty; string LStrVerificationCode104 = string.Empty; SqlConnection LSqlConnection = null; OracleConnection LOracleConnection = null; string LStrSelectSQL = string.Empty; List <string> LListStrReplaceArgs = new List <string>(); List <string> LListStrException = new List <string>(); try { #region 局部变量初始化、定义 LStrVerificationCode004 = CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M004); LStrVerificationCode104 = CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104); DataOperations01 LDataOperation = new DataOperations01(); DatabaseOperation01Return LDBOperationReturn = new DatabaseOperation01Return(); #endregion #region 获取操作日志流水号 string LStrOperationSerialID = string.Empty; if (AListStrOperationInfo[1] == "11000") { LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(IIntDBType, IStrDBConnectProfile, 11, 901, AListStrOperationInfo[3], DateTime.UtcNow.ToString("yyyyMMddHHmmss")); } else { LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(IIntDBType, IStrDBConnectProfile, 11, 902, AListStrOperationInfo[3], DateTime.UtcNow.ToString("yyyyMMddHHmmss")); } if (!LDBOperationReturn.BoolReturn) { //系统分配操作日志流水号失败 AStrReturnCode = EncryptionAndDecryption.EncryptDecryptString("E01B01", LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); AStrReturnMessage = LDBOperationReturn.StrReturn; return(false); } else { LStrOperationSerialID = LDBOperationReturn.StrReturn; } #endregion #region 拆分替换参数和异常出错 string LStrReplaceArgs = string.Empty; string LStrException = string.Empty; LStrReplaceArgs = AListStrOperationInfo[11]; LStrException = AListStrOperationInfo[12]; while (LStrReplaceArgs.Length > 1024) { LListStrReplaceArgs.Add(LStrReplaceArgs.Substring(0, 1024)); LStrReplaceArgs = LStrReplaceArgs.Substring(1024); } if (!string.IsNullOrEmpty(LStrReplaceArgs)) { LListStrReplaceArgs.Add(LStrReplaceArgs); } while (LListStrReplaceArgs.Count < 5) { LListStrReplaceArgs.Add(""); } while (LStrException.Length > 1024) { LListStrException.Add(LStrException.Substring(0, 1024)); LStrException = LStrException.Substring(1024); } if (!string.IsNullOrEmpty(LStrException)) { LListStrException.Add(LStrException); } while (LListStrException.Count < 5) { LListStrException.Add(""); } #endregion #region 将日志写入DataSet中 //LStrSelectSQL = "SELECT * FROM T_11_901_" + AListStrOperationInfo[3] + " WHERE 1 = 2"; LStrSelectSQL = "SELECT * FROM T_11_901 WHERE 1 = 2"; LDBOperationReturn = LDataOperation.SelectDataByDynamicSQL(IIntDBType, IStrDBConnectProfile, LStrSelectSQL); DataSet LDataSetSave2DB = LDBOperationReturn.DataSetReturn; LDataSetSave2DB.Tables[0].TableName = "T_11_901"; DataRow LDataRowNewLog = LDataSetSave2DB.Tables[0].NewRow(); LDataRowNewLog.BeginEdit(); LDataRowNewLog["C001"] = long.Parse(LStrOperationSerialID); LDataRowNewLog["C002"] = long.Parse(AListStrOperationInfo[0]); LDataRowNewLog["C003"] = Int16.Parse(AListStrOperationInfo[1]); LDataRowNewLog["C004"] = long.Parse(AListStrOperationInfo[2]); LDataRowNewLog["C005"] = long.Parse(AListStrOperationInfo[4]); LDataRowNewLog["C006"] = AListStrOperationInfo[6]; LDataRowNewLog["C007"] = AListStrOperationInfo[7]; LDataRowNewLog["C008"] = long.Parse((DateTime.Parse(AListStrOperationInfo[8])).ToString("yyyyMMddHHmmss")); LDataRowNewLog["C009"] = AListStrOperationInfo[9]; LDataRowNewLog["C010"] = AListStrOperationInfo[10]; LDataRowNewLog["C011"] = LListStrReplaceArgs[0]; LDataRowNewLog["C012"] = LListStrReplaceArgs[1]; LDataRowNewLog["C013"] = LListStrReplaceArgs[2]; LDataRowNewLog["C014"] = LListStrReplaceArgs[3]; LDataRowNewLog["C015"] = LListStrReplaceArgs[4]; LDataRowNewLog["C016"] = LListStrException[0]; LDataRowNewLog["C017"] = LListStrException[1]; LDataRowNewLog["C018"] = LListStrException[2]; LDataRowNewLog["C019"] = LListStrException[3]; LDataRowNewLog["C020"] = LListStrException[4]; LDataRowNewLog["C021"] = long.Parse(AListStrOperationInfo[5]); LDataRowNewLog["C022"] = AListStrOperationInfo[3]; LDataRowNewLog.EndEdit(); LDataSetSave2DB.Tables[0].Rows.Add(LDataRowNewLog); #endregion #region 将操作日志写入MSSQL数据库 if (IIntDBType == 2) { LSqlConnection = new SqlConnection(IStrDBConnectProfile); SqlDataAdapter LSqlDataAdapter = new SqlDataAdapter(LStrSelectSQL, LSqlConnection); SqlCommandBuilder LSqlCommandBuilder = new SqlCommandBuilder(); LSqlCommandBuilder.ConflictOption = ConflictOption.OverwriteChanges; LSqlCommandBuilder.SetAllValues = false; LSqlCommandBuilder.DataAdapter = LSqlDataAdapter; LSqlDataAdapter.Update(LDataSetSave2DB, "T_11_901"); LDataSetSave2DB.AcceptChanges(); LSqlCommandBuilder.Dispose(); LSqlDataAdapter.Dispose(); } #endregion #region 将操作日志写入Oracle数据库 if (IIntDBType == 3) { LOracleConnection = new OracleConnection(IStrDBConnectProfile); OracleDataAdapter LOracleDataAdapter = new OracleDataAdapter(LStrSelectSQL, LOracleConnection); OracleCommandBuilder LOracleCommandBuilder = new OracleCommandBuilder(); LOracleCommandBuilder.ConflictOption = ConflictOption.OverwriteChanges; LOracleCommandBuilder.SetAllValues = false; LOracleCommandBuilder.DataAdapter = LOracleDataAdapter; LOracleDataAdapter.Update(LDataSetSave2DB, "T_11_901"); LDataSetSave2DB.AcceptChanges(); LOracleCommandBuilder.Dispose(); LOracleDataAdapter.Dispose(); } #endregion } catch (Exception ex) { LBoolReturn = false; AStrReturnCode = EncryptionAndDecryption.EncryptDecryptString("E01B99", LStrVerificationCode004, EncryptionAndDecryption.UMPKeyAndIVType.M004); AStrReturnMessage = "S01BOperations.S01BOperation01()\n" + ex.Message; } finally { if (LSqlConnection != null) { if (LSqlConnection.State == System.Data.ConnectionState.Open) { LSqlConnection.Close(); } LSqlConnection.Dispose(); } if (LOracleConnection != null) { if (LOracleConnection.State == ConnectionState.Open) { LOracleConnection.Close(); } LOracleConnection.Dispose(); LOracleConnection = null; } } return(LBoolReturn); }
/// <summary> /// 查询操作日志 /// </summary> /// <param name="AListStringArgs"> /// 0:数据库类型 /// 1:数据库连接串 /// 2:租户Token /// 3~N:查询条件</param> /// <returns></returns> private OperationDataArgs OperationA02(List <string> AListStringArgs) { OperationDataArgs LOperationReturn = new OperationDataArgs(); string LStrFirst4Char = string.Empty; string LStrAfter4Char = string.Empty; string LStr11901008B = string.Empty; //开始时间 yyyy/MM/dd HH:mm:ss string LStr11901008E = string.Empty; //结束时间 yyyy/MM/dd HH:mm:ss List <string> LListStrOperationID = new List <string>(); List <string> LListStrUserID = new List <string>(); List <string> LListStrOperationResult = new List <string>(); List <string> LListStrHostName = new List <string>(); List <string> LListStrHostIPAddress = new List <string>(); string LStrOP911 = string.Empty, LStrUA911 = string.Empty, LStrOR911 = string.Empty, LStrHN911 = string.Empty, LStrIP911 = string.Empty; int LIntDBType = 0; string LStrDBProfile = string.Empty; string LStrSelectSQL = string.Empty; int LIntTempID = 0; SqlConnection LSqlConnection = null; OracleConnection LOracleConnection = null; try { LIntDBType = int.Parse(AListStringArgs[0]); LStrDBProfile = AListStringArgs[1]; DataOperations01 LDataOperation = new DataOperations01(); DatabaseOperation01Return LDBOperationReturn = new DatabaseOperation01Return(); #region 分析日志查询条件 foreach (string LStrSelectSingleArgs in AListStringArgs) { if (LStrSelectSingleArgs.Length < 4) { continue; } LStrFirst4Char = LStrSelectSingleArgs.Substring(0, 4); LStrAfter4Char = LStrSelectSingleArgs.Substring(4); if (LStrFirst4Char == AscCodeToChr(27) + "BT" + AscCodeToChr(27)) { LStr11901008B = (DateTime.Parse(LStrAfter4Char)).ToString("yyyyMMddHHmmss"); continue; } if (LStrFirst4Char == AscCodeToChr(27) + "ET" + AscCodeToChr(27)) { LStr11901008E = (DateTime.Parse(LStrAfter4Char)).ToString("yyyyMMddHHmmss"); continue; } if (LStrFirst4Char == AscCodeToChr(27) + "OP" + AscCodeToChr(27)) { LListStrOperationID.Add(LStrAfter4Char); continue; } if (LStrFirst4Char == AscCodeToChr(27) + "UA" + AscCodeToChr(27)) { LListStrUserID.Add(LStrAfter4Char); continue; } if (LStrFirst4Char == AscCodeToChr(27) + "OR" + AscCodeToChr(27)) { LListStrOperationResult.Add(LStrAfter4Char); continue; } if (LStrFirst4Char == AscCodeToChr(27) + "HN" + AscCodeToChr(27)) { LListStrHostName.Add(LStrAfter4Char); continue; } if (LStrFirst4Char == AscCodeToChr(27) + "IP" + AscCodeToChr(27)) { LListStrHostIPAddress.Add(LStrAfter4Char); continue; } } #endregion #region 保存数据查询条件 LStrSelectSQL = "SELECT * FROM T_00_901 WHERE 1 = 2"; LDBOperationReturn = LDataOperation.SelectDataByDynamicSQL(LIntDBType, LStrDBProfile, LStrSelectSQL); DataSet LDataSetSave2DB = LDBOperationReturn.DataSetReturn; LDataSetSave2DB.Tables[0].TableName = "T_00_901"; if (LListStrOperationID.Count > 0) { LIntTempID = 0; LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(LIntDBType, LStrDBProfile, 11, 911, AListStringArgs[2], DateTime.UtcNow.ToString("yyyyMMddHHmmss")); if (LDBOperationReturn.BoolReturn) { LStrOP911 = LDBOperationReturn.StrReturn; } else { LOperationReturn.BoolReturn = false; LOperationReturn.StringReturn = LDBOperationReturn.StrReturn; return(LOperationReturn); } foreach (string LStrSingleOperation in LListStrOperationID) { LIntTempID += 1; DataRow LDataRowNewOperation = LDataSetSave2DB.Tables[0].NewRow(); LDataRowNewOperation.BeginEdit(); LDataRowNewOperation["C001"] = long.Parse(LStrOP911); LDataRowNewOperation["C002"] = LIntTempID; LDataRowNewOperation["C011"] = LStrSingleOperation; LDataRowNewOperation.EndEdit(); LDataSetSave2DB.Tables[0].Rows.Add(LDataRowNewOperation); } } if (LListStrUserID.Count > 0) { LIntTempID = 0; LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(LIntDBType, LStrDBProfile, 11, 911, AListStringArgs[2], DateTime.UtcNow.ToString("yyyyMMddHHmmss")); if (LDBOperationReturn.BoolReturn) { LStrUA911 = LDBOperationReturn.StrReturn; } else { LOperationReturn.BoolReturn = false; LOperationReturn.StringReturn = LDBOperationReturn.StrReturn; return(LOperationReturn); } foreach (string LStrSingleUser in LListStrUserID) { LIntTempID += 1; DataRow LDataRowNewOperation = LDataSetSave2DB.Tables[0].NewRow(); LDataRowNewOperation.BeginEdit(); LDataRowNewOperation["C001"] = long.Parse(LStrUA911); LDataRowNewOperation["C002"] = LIntTempID; LDataRowNewOperation["C011"] = LStrSingleUser; LDataRowNewOperation.EndEdit(); LDataSetSave2DB.Tables[0].Rows.Add(LDataRowNewOperation); } } if (LListStrOperationResult.Count > 0) { LIntTempID = 0; LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(LIntDBType, LStrDBProfile, 11, 911, AListStringArgs[2], DateTime.UtcNow.ToString("yyyyMMddHHmmss")); if (LDBOperationReturn.BoolReturn) { LStrOR911 = LDBOperationReturn.StrReturn; } else { LOperationReturn.BoolReturn = false; LOperationReturn.StringReturn = LDBOperationReturn.StrReturn; return(LOperationReturn); } foreach (string LStrSingleResult in LListStrOperationResult) { LIntTempID += 1; DataRow LDataRowNewOperation = LDataSetSave2DB.Tables[0].NewRow(); LDataRowNewOperation.BeginEdit(); LDataRowNewOperation["C001"] = long.Parse(LStrOR911); LDataRowNewOperation["C002"] = LIntTempID; LDataRowNewOperation["C011"] = LStrSingleResult; LDataRowNewOperation.EndEdit(); LDataSetSave2DB.Tables[0].Rows.Add(LDataRowNewOperation); } } if (LListStrHostName.Count > 0) { LIntTempID = 0; LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(LIntDBType, LStrDBProfile, 11, 911, AListStringArgs[2], DateTime.UtcNow.ToString("yyyyMMddHHmmss")); if (LDBOperationReturn.BoolReturn) { LStrHN911 = LDBOperationReturn.StrReturn; } else { LOperationReturn.BoolReturn = false; LOperationReturn.StringReturn = LDBOperationReturn.StrReturn; return(LOperationReturn); } foreach (string LStrSingleHost in LListStrHostName) { LIntTempID += 1; DataRow LDataRowNewOperation = LDataSetSave2DB.Tables[0].NewRow(); LDataRowNewOperation.BeginEdit(); LDataRowNewOperation["C001"] = long.Parse(LStrHN911); LDataRowNewOperation["C002"] = LIntTempID; LDataRowNewOperation["C011"] = LStrSingleHost; LDataRowNewOperation.EndEdit(); LDataSetSave2DB.Tables[0].Rows.Add(LDataRowNewOperation); } } if (LListStrHostIPAddress.Count > 0) { LIntTempID = 0; LDBOperationReturn = LDataOperation.GetSerialNumberByProcedure(LIntDBType, LStrDBProfile, 11, 911, AListStringArgs[2], DateTime.UtcNow.ToString("yyyyMMddHHmmss")); if (LDBOperationReturn.BoolReturn) { LStrIP911 = LDBOperationReturn.StrReturn; } else { LOperationReturn.BoolReturn = false; LOperationReturn.StringReturn = LDBOperationReturn.StrReturn; return(LOperationReturn); } foreach (string LStrSingleIPAddress in LListStrHostIPAddress) { LIntTempID += 1; DataRow LDataRowNewOperation = LDataSetSave2DB.Tables[0].NewRow(); LDataRowNewOperation.BeginEdit(); LDataRowNewOperation["C001"] = long.Parse(LStrIP911); LDataRowNewOperation["C002"] = LIntTempID; LDataRowNewOperation["C011"] = LStrSingleIPAddress; LDataRowNewOperation.EndEdit(); LDataSetSave2DB.Tables[0].Rows.Add(LDataRowNewOperation); } } if (LIntDBType == 2) { LSqlConnection = new SqlConnection(LStrDBProfile); SqlDataAdapter LSqlDataAdapter = new SqlDataAdapter(LStrSelectSQL, LSqlConnection); SqlCommandBuilder LSqlCommandBuilder = new SqlCommandBuilder(); LSqlCommandBuilder.ConflictOption = ConflictOption.OverwriteChanges; LSqlCommandBuilder.SetAllValues = false; LSqlCommandBuilder.DataAdapter = LSqlDataAdapter; LSqlDataAdapter.Update(LDataSetSave2DB, "T_00_901"); LDataSetSave2DB.AcceptChanges(); LSqlCommandBuilder.Dispose(); LSqlDataAdapter.Dispose(); } if (LIntDBType == 3) { LOracleConnection = new OracleConnection(LStrDBProfile); OracleDataAdapter LOracleDataAdapter = new OracleDataAdapter(LStrSelectSQL, LOracleConnection); OracleCommandBuilder LOracleCommandBuilder = new OracleCommandBuilder(); LOracleCommandBuilder.ConflictOption = ConflictOption.OverwriteChanges; LOracleCommandBuilder.SetAllValues = false; LOracleCommandBuilder.DataAdapter = LOracleDataAdapter; LOracleDataAdapter.Update(LDataSetSave2DB, "T_00_901"); LDataSetSave2DB.AcceptChanges(); LOracleCommandBuilder.Dispose(); LOracleDataAdapter.Dispose(); } #endregion #region 创建查询SQL语句 LStrSelectSQL = "SELECT * FROM T_11_901_" + AListStringArgs[2] + " WHERE C008 >= " + LStr11901008B + " AND C008 <= " + LStr11901008E; if (!string.IsNullOrEmpty(LStrOP911)) { if (LIntDBType == 2) { LStrSelectSQL += " AND (C004 IN (SELECT CONVERT(BIGINT, C011) FROM T_00_901 WHERE C001 = " + LStrOP911 + "))"; } else { LStrSelectSQL += " AND (C004 IN (SELECT TO_NUMBER(C011) FROM T_00_901 WHERE C001 = " + LStrOP911 + "))"; } } if (!string.IsNullOrEmpty(LStrUA911)) { if (LIntDBType == 2) { LStrSelectSQL += " AND (C005 IN (SELECT CONVERT(BIGINT, C011) FROM T_00_901 WHERE C001 = " + LStrUA911 + "))"; } else { LStrSelectSQL += " AND (C005 IN (SELECT TO_NUMBER(C011) FROM T_00_901 WHERE C001 = " + LStrUA911 + "))"; } } if (!string.IsNullOrEmpty(LStrOR911)) { LStrSelectSQL += " AND (C009 IN (SELECT C011 FROM T_00_901 WHERE C001 = " + LStrOR911 + "))"; } if (!string.IsNullOrEmpty(LStrHN911)) { LStrSelectSQL += " AND (C006 IN (SELECT C011 FROM T_00_901 WHERE C001 = " + LStrHN911 + "))"; } if (!string.IsNullOrEmpty(LStrIP911)) { LStrSelectSQL += " AND (C007 IN (SELECT C011 FROM T_00_901 WHERE C001 = " + LStrIP911 + "))"; } #endregion #region 根据SQL语句查询操作日志 LDBOperationReturn = LDataOperation.SelectDataByDynamicSQL(LIntDBType, LStrDBProfile, LStrSelectSQL); if (LDBOperationReturn.BoolReturn) { LOperationReturn.DataSetReturn = LDBOperationReturn.DataSetReturn; LOperationReturn.StringReturn = LDBOperationReturn.StrReturn; LOperationReturn.ListStringReturn.Add(LStrSelectSQL); } else { LOperationReturn.BoolReturn = false; LOperationReturn.StringReturn = LDBOperationReturn.StrReturn; } #endregion } catch (Exception ex) { LOperationReturn.BoolReturn = false; LOperationReturn.StringReturn = ex.ToString(); } finally { if (LSqlConnection != null) { if (LSqlConnection.State == System.Data.ConnectionState.Open) { LSqlConnection.Close(); } LSqlConnection.Dispose(); } if (LOracleConnection != null) { if (LOracleConnection.State == ConnectionState.Open) { LOracleConnection.Close(); } LOracleConnection.Dispose(); LOracleConnection = null; } } return(LOperationReturn); }