Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LoanManagement
- {
- private AccountManagement accountManagement;
- public void CreateLoanRequest(int customerId, long loanAmount,DateTime scoreStartDate, DateTime loanDate)
- {
- //چک کردن امتیاز موجودی حساب کاربر
- if(!accountManagement.CustomerHasAcceptableBalanceAvreage(customerId,scoreStartDate,loanDate))
- {
- throw new Exception();
- }
- // بررسی اینکه مشتری وام معوق نداشته باشه
- if (CustomrHasDelayedLoan( customerId))
- {
- throw new Exception();
- }
- //create LoanRequest
- }
- public bool CustomrHasDelayedLoan(int customerId)
- {
- return true;
- }
- }
Add Comment
Please, Sign In to add comment