Пример #1
0
        public async Task <JsonResult> UpdateInterestSettings([FromBody] SettingViewModel viewModel)
        {
            await SettingManager.ChangeSettingForApplicationAsync(AppSettingNames.InterestStatus, viewModel.InterestStatus.ToString());

            if (!viewModel.InterestStatus)
            {
                SavingsInterestManager.StopSavingsInterestProcessing();
                return(Json(new { }));
            }

            await SettingManager.ChangeSettingForApplicationAsync(AppSettingNames.InterestType,
                                                                  viewModel.InterestType);

            await SettingManager.ChangeSettingForApplicationAsync(AppSettingNames.InterestRate,
                                                                  viewModel.InterestRate.ToString());

            await SettingManager.ChangeSettingForApplicationAsync(AppSettingNames.InterestDuration,
                                                                  viewModel.InterestDuration.ToString());

            /*await SettingManager.ChangeSettingForApplicationAsync(AppSettingNames.InterestDurationStartDate,
             *  viewModel.InterestDurationStartDate.ToString("dd/MM/yyyy"));
             * await SettingManager.ChangeSettingForApplicationAsync(AppSettingNames.InterestDurationEndDate,
             *  viewModel.InterestDurationEndDate.ToString("dd/MM/yyyy"));*/
            await SettingManager.ChangeSettingForApplicationAsync(AppSettingNames.PenaltyPercentageDeduction,
                                                                  viewModel.PenaltyDeduction.ToString());

            //Bootstrap SavingsInterest for all accountHolders.
            await _savingsInterestManager.BootstrapNewSavingsInterestForAllAccountHolders();

            SavingsInterestManager.StartSavingsInterestProcessing();

            return(Json(new { }));
        }
Пример #2
0
        //private readonly IOptions<AWSCredentialOptions> _credentialOptions;

        public AccountHolderHomeController(
            ITransactionLogAppService transactionLogAppService,
            PayCodeService payCodeService,
            SavingsInterestManager interestManager,
            IConfiguration tempConfig
            //IOptions<AWSCredentialOptions> credentialOptions
            )
        {
            _transactionLogAppService = transactionLogAppService;
            _payCodeService           = payCodeService;
            _interestManager          = interestManager;
            _tempConfig = tempConfig;
            //_credentialOptions = credentialOptions;
        }
Пример #3
0
 public SignUpController(
     IVerificationCodeService verificationCodeService,
     SmsService smsService,
     UserSignUpManager userSignUpManager,
     UserManager userManager,
     AccountHolderService accountHolderService,
     NotificationScheduler notificationScheduler,
     SavingsInterestManager savingsInterestManager)
 {
     _verificationCodeService = verificationCodeService;
     _smsService             = smsService;
     _userSignUpManager      = userSignUpManager;
     _userManager            = userManager;
     _accountHolderService   = accountHolderService;
     _notificationScheduler  = notificationScheduler;
     _savingsInterestManager = savingsInterestManager;
 }
Пример #4
0
 public SettingsController(
     SavingsInterestManager savingsInterestManager
     )
 {
     _savingsInterestManager = savingsInterestManager;
 }