コード例 #1
0
ファイル: PawnProcessing.cs プロジェクト: njmube/PawnPOS
        public void CheckMaxChargeDate()
        {
            DataManager dataManager = new DataManager(connectionString);

            if (chargedPawnIdList.Count >= 1)
            {
                foreach (string pawnID in chargedPawnIdList)
                {
                    DateTime chargeDate = dataManager.GetMaxChargeDate(pawnID);
                    DateTime today = DateTime.Today;
                    TimeSpan diffDays = today - chargeDate;
                    double loanDays = diffDays.TotalDays;

                    if (loanDays >= 31)
                    {
                        ApplyChargedFinanceCharge(pawnID);
                    }
                }
            }
        }