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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }