Exemple #1
0
        private void SaveLoanInterestFreeze(LoanInterestFreeze loanInterestFreeze, int loanID)
        {
            int customerId = this._loans.Get(loanInterestFreeze.Loan.Id).Customer.Id;

            long newLoanId = this.serviceClient.Instance.GetLoanByOldID(loanID, customerId, this._context.UserId).Value;

            if (newLoanId < 0)
            {
                return;
            }
            NL_LoanInterestFreeze nlLoanInterestFreeze = new NL_LoanInterestFreeze()
            {
                StartDate        = loanInterestFreeze.StartDate,
                OldID            = loanInterestFreeze.Id,
                ActivationDate   = loanInterestFreeze.ActivationDate,
                DeactivationDate = loanInterestFreeze.DeactivationDate,
                EndDate          = loanInterestFreeze.EndDate,
                InterestRate     = loanInterestFreeze.InterestRate,
                LoanID           = newLoanId,
                AssignedByUserID = this._context.UserId,
                DeletedByUserID  = null,
            };

            this.serviceClient.Instance.AddLoanInterestFreeze(this._context.UserId, customerId, nlLoanInterestFreeze);
        }
        private void SaveLoanInterestFreeze(LoanInterestFreeze loanInterestFreeze, int customerId, int loanID)
        {
            long nlLoanId = this.serviceClient.Instance.GetLoanByOldID(loanID, customerId, this.context.UserId).Value;

            if (nlLoanId == 0)
            {
                return;
            }
            NL_LoanInterestFreeze nlLoanInterestFreeze = new NL_LoanInterestFreeze()
            {
                StartDate        = loanInterestFreeze.StartDate,
                OldID            = loanInterestFreeze.Id,
                ActivationDate   = loanInterestFreeze.ActivationDate,
                DeactivationDate = loanInterestFreeze.DeactivationDate,
                EndDate          = loanInterestFreeze.EndDate,
                InterestRate     = loanInterestFreeze.InterestRate,
                LoanID           = nlLoanId,
                AssignedByUserID = this.context.UserId,
                DeletedByUserID  = null,
            };

            log.Debug("ADDING NL FREESE: {0} \n olffreeze: {1}", nlLoanInterestFreeze, loanInterestFreeze);

            var nlStrategy = this.serviceClient.Instance.AddLoanInterestFreeze(this.context.UserId, customerId, nlLoanInterestFreeze).Value;
        }
Exemple #3
0
        }         // AddLoanOptions

        public NLLongActionResult AddLoanInterestFreeze(int userID, int customerID, NL_LoanInterestFreeze loanInterestFreeze)
        {
            AddLoanInterestFreeze s = new AddLoanInterestFreeze(loanInterestFreeze);

            s.Context.UserID     = userID;
            s.Context.CustomerID = customerID;
            var amd = ExecuteSync(out s, customerID, userID, loanInterestFreeze);

            return(new NLLongActionResult {
                MetaData = amd,
                Value = s.LoanFreezeInterval.LoanInterestFreezeID
            });
        }         // AddLoanOptions
Exemple #4
0
        private void DeactivateLoanInterestFreeze(LoanInterestFreeze loanInterestFreeze, int customerId)
        {
            long nlLoanId = this.serviceClient.Instance.GetLoanByOldID(loanInterestFreeze.Loan.Id, customerId, this.context.UserId).Value;

            if (nlLoanId == 0)
            {
                return;
            }
            NL_LoanInterestFreeze nlLoanInterestFreeze = new NL_LoanInterestFreeze()
            {
                OldID            = loanInterestFreeze.Id,
                DeactivationDate = loanInterestFreeze.DeactivationDate,
                LoanID           = nlLoanId,
                AssignedByUserID = this.context.UserId,
                DeletedByUserID  = null,
            };
            var nlStrategy = this.serviceClient.Instance.DeactivateLoanInterestFreeze(this.context.UserId, customerId, nlLoanInterestFreeze).Value;
        }
Exemple #5
0
 public AddLoanInterestFreeze(NL_LoanInterestFreeze loanInterestFreeze)
 {
     LoanFreezeInterval = loanInterestFreeze;
 }//constructor
Exemple #6
0
 public DeactivateLoanInterestFreeze(NL_LoanInterestFreeze freezeInterval)
 {
     LoanFreezeInterval = freezeInterval;
 }        //constructor