public void AddToCart() { if (_navigationService.HostScreen.CurrentUser != null) { if (CurrentUserCard != null && CurrentUserCard.Activated != false) { ILoansService _loans = IoC.ServiceProvider.GetService <ILoansService>(); _loans.LoanCart.Add(currentBook); _dialog.Alert("Varukorg", $"Tillagd i varukorgen"); if (currentBook.Category == 1) { currentBook.Quantity--; } CancelCommand.Execute(null); } else { _dialog.Alert("Lånekort", "Du har inget Lånekort registrerat eller aktiverat \nVänligen kontakta personalen"); } } else { _dialog.Alert("Login", "Vänligen logga in för att låna"); } }
public RepayLoanCommandValidator(ILoansService loansService) { this.loansService = loansService; RuleFor(x => x.LoanId) .MustAsync(LoanExist) .WithMessage(RepayLoanCommandValidatorResource.LoanDesNotExist); }
public LoansController( ICommandBus commandBus, ILoansService loansService, ApiSettings apiSettings ) { this.commandBus = commandBus; this.loansService = loansService; this.apiSettings = apiSettings; }
public LoansAppService(ILoansService loansService) : base(loansService) { _loansService = loansService; }
public LoansController(ILoansService loansService, IMapper mapper, IMessageSession messageSession) { _loansService = loansService; _mapper = mapper; _messageSession = messageSession; }
public LoansController(ILoansService loansService) { this.loanService = loansService; }
public UpdateLoanAfterCheckLegalityHandler(ILoansService loansService) { _loansService = loansService; }