public static bool CheckCostTypeExists(string ACostTypeCode) { TDBTransaction ReadTransaction; Boolean NewTransaction; Boolean RowExists = false; ReadTransaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.ReadCommitted, TEnforceIsolationLevel.eilMinimum, out NewTransaction); try { RowExists = PcCostTypeAccess.Exists(ACostTypeCode, ReadTransaction); } catch (Exception e) { TLogging.Log(e.ToString()); } finally { if (NewTransaction) { DBAccess.GDBAccessObj.RollbackTransaction(); TLogging.LogAtLevel(7, "TConferenceDataReaderWebConnector.CheckCostTypeExists: rollback own transaction."); } } return(RowExists); }
public static bool CheckCostTypeExists(string ACostTypeCode) { TDBTransaction ReadTransaction = new TDBTransaction(); Boolean RowExists = false; DBAccess.ReadTransaction(ref ReadTransaction, delegate { RowExists = PcCostTypeAccess.Exists(ACostTypeCode, ReadTransaction); }); return(RowExists); }
public static bool CheckCostTypeExists(string ACostTypeCode) { TDBTransaction ReadTransaction = null; Boolean RowExists = false; DBAccess.GDBAccessObj.GetNewOrExistingAutoReadTransaction(IsolationLevel.ReadCommitted, TEnforceIsolationLevel.eilMinimum, ref ReadTransaction, delegate { RowExists = PcCostTypeAccess.Exists(ACostTypeCode, ReadTransaction); }); return(RowExists); }