コード例 #1
0
ファイル: PawnProcessing.cs プロジェクト: njmube/PawnPOS
        public void ApplySinglePawnFinanceCharge(string pawnID)
        {
            DataManager dataManager = new DataManager(connectionString);
            double financeChargePercent = Convert.ToDouble(GetFinanceCharge());
            double newBalance;
            double financeCharge;

            double principalAmount = dataManager.GetSinglePrincipalAmount(pawnID);

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

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