public void LateLoanProcessing() { foreach (Loan loan in _listLoan) { UpdateStatus("OverdueEventsProcessingForContract", " ->" + loan.Code); OverdueEvent e = loan.GetOverdueEvent(TimeProvider.Now); if (e != null) { _generatedEvents.Add(e); } } }
public void TestFixtureSetUp() { _eventStock = new EventStock(); _eventStock.Add(new RepaymentEvent()); _eventStock.Add(new RescheduledLoanRepaymentEvent()); _eventStock.Add(new BadLoanRepaymentEvent()); _eventStock.Add(new StatisticalProvisionningEvent()); _eventStock.Add(new LoanDisbursmentEvent()); _eventStock.Add(new RescheduleLoanEvent()); _eventStock.Add(new WriteOffEvent()); }
private void BtnPostClick(object sender, EventArgs e) { btnPost.Enabled = false; EnableCloseButton(this, false); try { if (_mode == 0) { _bookings = olvBookings.CheckedObjects.Cast <Booking>().ToList(); if (_bookings.Count > 0) { bwPostBookings.RunWorkerAsync(); } else { MessageBox.Show(@"Please select items !"); btnPost.Enabled = true; EnableCloseButton(this, true); } } if (_mode == 1) { foreach (Event evt in olvEvents.CheckedObjects) { _eventStock.Add(evt); } if (_eventStock.GetEvents().Count > 0) { bwPostEvents.RunWorkerAsync(); } else { MessageBox.Show(@"Please select items !"); EnableCloseButton(this, true); btnPost.Enabled = true; } } } catch (Exception ex) { new frmShowError(CustomExceptionHandler.ShowExceptionText(ex)).ShowDialog(); } }
public void TestClosureTellerEvents() { EventStock eventStock = new EventStock { new TellerCashInEvent { Id = 1, Amount = 1000, Currency = new Currency { Id = 1 }, Date = new DateTime(2000, 1, 1), TellerId = 2 } }; eventStock.Add(new EventStock { new TellerCashOutEvent { Id = 2, Amount = 267, Currency = new Currency { Id = 1 }, Date = new DateTime(2000, 1, 1), TellerId = 3 } }); List <FiscalYear> fYears = new List <FiscalYear> { new FiscalYear { OpenDate = new DateTime(1900, 1, 1) } }; AccountingClosure closure = new AccountingClosure(); List <Booking> bookings = closure.GetBookings(_rules, eventStock, _tellers, null, null, fYears); Assert.AreEqual(bookings[0].Amount, 1000); Assert.AreEqual(bookings[0].CreditAccount.Number, "1991"); Assert.AreEqual(bookings[0].DebitAccount.Number, "1999"); Assert.AreEqual(bookings[1].Amount, 267); Assert.AreEqual(bookings[1].CreditAccount.Number, "1999"); Assert.AreEqual(bookings[1].DebitAccountNumber, "1992"); }