Example #1
0
 public void ConfirmNoTransaction(int id)
 {
     try
     {
         EventJournal events = this.Get(id);
         if (events.POSTED)
         {
             throw new Exception("Status is already Posted/Confirm");
         }
         Period p = AssertValidPeriod(events.TRANSACTION_DATE);
         events.ProcessPosting();
         doConfirm(events, p);
         this.UpdateStatus(events, true);
         //updateVendorBalances(events.EVENT_JOURNAL_ITEMS);
     }
     catch (Exception x)
     {
         throw x;
     }
 }
Example #2
0
 public void Confirm(int id)
 {
     MySql.Data.MySqlClient.MySqlTransaction trc = m_connection.BeginTransaction();
     m_command.Transaction = trc;
     try
     {
         EventJournal events = this.Get(id);
         if (events.POSTED)
         {
             throw new Exception("Status is already Posted/Confirm");
         }
         Period p = AssertValidPeriod(events.TRANSACTION_DATE);
         events.ProcessPosting();
         doConfirm(events, p);
         this.UpdateStatus(events, true);
         //updateVendorBalances(events.EVENT_JOURNAL_ITEMS);
         trc.Commit();
     }
     catch (Exception x)
     {
         trc.Rollback();
         throw x;
     }
 }