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 { })); }
//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; }
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; }
public SettingsController( SavingsInterestManager savingsInterestManager ) { _savingsInterestManager = savingsInterestManager; }