Exemple #1
0
        public void ApplyPaymentCharge(string pawnID)
        {
            DataManager dataManager = new DataManager(connectionString);
            double financeChargePercent = Convert.ToDouble(GetFinanceCharge());
            double newBalance;
            double financeCharge;

            double principalAmount = dataManager.GetMaxPaymentPrincipal(pawnID);

            financeCharge = principalAmount * financeChargePercent;
            newBalance = principalAmount + financeCharge;

            dataManager.UpdatePawnChargesTable(pawnID, DateTime.Today, financeCharge.ToString(),
                principalAmount.ToString(), newBalance.ToString());
        }