private void CommitLedgerChange() { TDBTransaction Transaction = null; Boolean SubmissionOK = false; try { DBAccess.GDBAccessObj.GetNewOrExistingAutoTransaction(IsolationLevel.Serializable, ref Transaction, ref SubmissionOK, delegate { ALedgerAccess.SubmitChanges(FLedgerTbl, Transaction); SubmissionOK = true; }); FLedgerTbl.AcceptChanges(); } catch (Exception ex) { TLogging.Log(String.Format("Method:{0} - Unexpected error!{1}{1}{2}", Utilities.GetMethodSignature(), Environment.NewLine, ex.Message)); throw ex; } GetDataRow(); }
private void CommitLedgerChange() { bool NewTransaction; TDBTransaction Transaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.Serializable, out NewTransaction); ALedgerAccess.SubmitChanges(FLedgerTbl, Transaction); FLedgerTbl.AcceptChanges(); if (NewTransaction) { DBAccess.GDBAccessObj.CommitTransaction(); GetDataRow(); } }
private void CommitLedgerChange() { TDBTransaction Transaction = new TDBTransaction(); TDataBase db = DBAccess.Connect("CommitLedgerChange", FDataBase); Boolean SubmissionOK = false; try { db.WriteTransaction( ref Transaction, ref SubmissionOK, delegate { ALedgerAccess.SubmitChanges(FLedgerTbl, Transaction); SubmissionOK = true; }); FLedgerTbl.AcceptChanges(); } catch (Exception ex) { TLogging.Log(String.Format("Method:{0} - Unexpected error!{1}{1}{2}", Utilities.GetMethodSignature(), Environment.NewLine, ex.Message)); throw; } if (FDataBase == null) { db.CloseDBConnection(); } GetDataRow(); if (FDataBase == null) { db.CloseDBConnection(); } }