private void LoanCloseOrigination(LoanCloseEvent pLoanCloseEvent, Loan pContract, SqlTransaction sqlTransac)
 {
     _eventManagement.AddLoanEvent(pLoanCloseEvent, pContract.Id, sqlTransac);
 }
Exemple #2
0
        private Event ReadEvent(OpenCbsReader r)
        {
            Event e;

            if (r.GetNullInt("lde_id").HasValue)
            {
                e = GetLoanDisbursmentEvent(r);
            }
            else if (r.GetNullInt("woe_id").HasValue)
            {
                e = GetWriteOffEvent(r);
            }
            else if (r.GetNullInt("rle_id").HasValue)
            {
                e = GetReschedulingLoanEvent(r);
            }
            else if (r.GetNullInt("rpe_id").HasValue)
            {
                e = GetRepaymentEvent(r);
            }
            else if (r.GetNullInt("tranche_id").HasValue)
            {
                e = GetTrancheLoanEvent(r);
            }
            else if (r.GetNullInt("liae_id").HasValue)
            {
                e = GetLoanInterestAccruingEvent(r);
            }
            else if (r.GetNullInt("ov_id").HasValue)
            {
                e = GetOverdueEvent(r);
            }
            else if (r.GetNullInt("pe_id").HasValue)
            {
                e = GetProvisionEvent(r);
            }
            else if (r.GetNullInt("ef_id").HasValue)
            {
                e = GetEntryFeeEvent(r);
            }
            else if (r.GetNullInt("cie_id").HasValue)
            {
                e = GetCreditInsuranceEvent(r);
            }
            else if (r.GetString("code").StartsWith("S"))
            {
                e = GetSavingEvent(r);
            }
            else
            {
                if(r.GetString("code").Equals("LOVE"))
                    e = new LoanValidationEvent{Id = r.GetInt("event_id")};
                else if (r.GetString("code").Equals("LOCE"))
                    e = new LoanCloseEvent{Id = r.GetInt("event_id")};
                else
                    e = new RegEvent {Id = r.GetInt("event_id")};
            }

            GetEvent(r, e);

            return e;
        }
Exemple #3
0
        public LoanCloseEvent GetCloseEvent(DateTime date)
        {
            int? teller = 0;
            if (Teller.CurrentTeller != null && Teller.CurrentTeller.Id != 0)
                teller = Teller.CurrentTeller.Id;
            LoanCloseEvent loanCloseEvent =  new LoanCloseEvent
                       {
                           Date = date,
                           Cancelable = true,
                           User = _user,
                           Deleted = false,
                           TellerId = teller
                       };

            Events.Add(loanCloseEvent);
            return loanCloseEvent;
        }
Exemple #4
0
 public void AddLoanEvent(LoanCloseEvent evnt, int contractId, SqlTransaction sqlTransac)
 {
     evnt.Id = AddLoanEventHead(evnt, contractId, sqlTransac);
 }