public ArtistAppService( ICrudServicesAsync crudServices, IMapper mapper) { _crudServices = crudServices; _mapper = mapper; }
public AccountListViewActionViewModel(ICrudServicesAsync crudServices, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { this.crudServices = crudServices; this.navigationService = navigationService; }
/// <summary> /// Base class for the category list user control /// </summary> protected AbstractCategoryListViewModel(ICrudServicesAsync crudServices, IDialogService dialogService, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { CrudServices = crudServices; DialogService = dialogService; }
/// <summary> /// Constructor /// </summary> public PaymentListBalanceViewModel(ICrudServicesAsync crudServices, IBalanceCalculationService balanceCalculationService, int accountId) : base(balanceCalculationService) { this.crudServices = crudServices; this.balanceCalculationService = balanceCalculationService; this.accountId = accountId; }
/// <summary> /// Creates an CategoryListViewModel for the usage of providing a CategoryViewModel selection. /// </summary> public SelectCategoryListViewModel(ICrudServicesAsync crudServicesAsync, IDialogService dialogService, IMvxMessenger messenger, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(crudServicesAsync, dialogService, logProvider, navigationService) { this.messenger = messenger; }
public async Task <IActionResult> AddPromotion(int id, [FromServices] ICrudServicesAsync <BookDbContext> service) { Request.ThrowErrorIfNotLocal(); var dto = await service.ReadSingleAsync <AddPromotionDto>(id); SetupTraceInfo(); return(View(dto)); }
/// <summary> /// Base class for the category list user control /// </summary> protected AbstractCategoryListViewModel(ICrudServicesAsync crudServices, IDialogService dialogService, INavigationService navigationService) { CrudServices = crudServices; DialogService = dialogService; NavigationService = navigationService; }
/// <summary> /// Constructor /// </summary> protected ModifyCategoryViewModel(ICrudServicesAsync crudServices, ISettingsFacade settingsFacade, IBackupService backupService, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { this.settingsFacade = settingsFacade; this.backupService = backupService; this.crudServices = crudServices; }
/// <summary> /// Constructor /// </summary> protected ModifyCategoryViewModel(ICrudServicesAsync crudServices, ISettingsFacade settingsFacade, IBackupService backupService, INavigationService navigationService) { this.settingsFacade = settingsFacade; this.backupService = backupService; this.crudServices = crudServices; NavigationService = navigationService; }
/// <summary> /// Constructor /// </summary> public PaymentListBalanceViewModel(ICrudServicesAsync crudServices, IBalanceCalculationService balanceCalculationService, int accountId, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base( balanceCalculationService, logProvider, navigationService) { this.crudServices = crudServices; this.balanceCalculationService = balanceCalculationService; this.accountId = accountId; }
public AddCategoryViewModel(ICrudServicesAsync crudServices, IDialogService dialogService, ISettingsFacade settingsFacade, IBackupService backupService, INavigationService navigationService) : base(crudServices, settingsFacade, backupService, navigationService) { this.crudServices = crudServices; this.dialogService = dialogService; Title = Strings.AddCategoryTitle; }
public AddCategoryViewModel(ICrudServicesAsync crudServices, IDialogService dialogService, ISettingsFacade settingsFacade, IBackupService backupService, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(crudServices, settingsFacade, backupService, logProvider, navigationService) { this.crudServices = crudServices; this.dialogService = dialogService; }
public EditAccountViewModel(ICrudServicesAsync crudServices, ISettingsFacade settingsFacade, IBackupService backupService, IDialogService dialogService, INavigationService navigationService) : base(settingsFacade, backupService, navigationService) { this.crudServices = crudServices; this.settingsFacade = settingsFacade; this.backupService = backupService; this.dialogService = dialogService; }
public SubscriberAppService( ICrudServicesAsync crudServices, EmailManager emailManager, TemplateManager templateManager, IConfiguration configuration ) { _crudServices = crudServices; _emailManager = emailManager; _templateManager = templateManager; _configuration = configuration; }
public AddPaymentViewModel(IPaymentService paymentService, ICrudServicesAsync crudServices, IDialogService dialogService, ISettingsFacade settingsFacade, IBackupService backupService, INavigationService navigationService) : base(crudServices, dialogService, settingsFacade, backupService, navigationService) { this.paymentService = paymentService; this.navigationService = navigationService; this.dialogService = dialogService; }
public async Task <IActionResult> RemovePromotion(int id, [FromServices] ICrudServicesAsync <BookDbContext> service) { Request.ThrowErrorIfNotLocal(); var dto = await service.ReadSingleAsync <RemovePromotionDto>(id); if (!service.IsValid) { service.CopyErrorsToModelState(ModelState, dto); } SetupTraceInfo(); return(View(dto)); }
public AddAccountViewModel(ICrudServicesAsync crudService, ISettingsFacade settingsFacade, IBackupService backupService, IDialogService dialogService, INavigationService navigationService) : base(settingsFacade, backupService, navigationService) { this.crudService = crudService; this.dialogService = dialogService; Title = Strings.AddAccountTitle; }
public AddPaymentViewModel(IPaymentService paymentService, ICrudServicesAsync crudServices, IDialogService dialogService, ISettingsFacade settingsFacade, IMvxMessenger messenger, IBackupService backupService, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(crudServices, dialogService, settingsFacade, messenger, backupService, logProvider, navigationService) { this.paymentService = paymentService; this.dialogService = dialogService; }
/// <summary> /// Default constructor /// </summary> protected ModifyPaymentViewModel(ICrudServicesAsync crudServices, IDialogService dialogService, ISettingsFacade settingsFacade, IBackupService backupService, INavigationService navigationService) { this.crudServices = crudServices; this.dialogService = dialogService; this.settingsFacade = settingsFacade; this.backupService = backupService; this.navigationService = navigationService; MessengerInstance.Register <CategorySelectedMessage>(this, ReceiveMessage); }
/// <summary> /// Default constructor /// </summary> protected ModifyPaymentViewModel(ICrudServicesAsync crudServices, IDialogService dialogService, ISettingsFacade settingsFacade, IMvxMessenger messenger, IBackupService backupService, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { this.crudServices = crudServices; this.dialogService = dialogService; this.settingsFacade = settingsFacade; this.backupService = backupService; this.navigationService = navigationService; token = messenger.Subscribe <CategorySelectedMessage>(ReceiveMessage); }
/// <summary> /// Constructor /// </summary> public AccountListViewModel(ICrudServicesAsync crudService, IBalanceCalculationService balanceCalculationService, IDialogService dialogService, ISettingsFacade settingsFacade, INavigationService navigationService) { this.crudService = crudService; this.dialogService = dialogService; this.navigationService = navigationService; this.settingsFacade = settingsFacade; BalanceViewModel = new BalanceViewModel(balanceCalculationService); ViewActionViewModel = new AccountListViewActionViewModel(crudService, this.navigationService); Accounts = new ObservableCollection <AlphaGroupListGroupCollection <AccountViewModel> >(); }
/// <summary> /// Constructor /// </summary> public PaymentListViewActionViewModel(ICrudServicesAsync crudServices, ISettingsFacade settingsFacade, IDialogService dialogService, IBalanceViewModel balanceViewModel, IMvxMessenger messenger, int accountId, IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService) { this.crudServices = crudServices; this.settingsFacade = settingsFacade; this.dialogService = dialogService; this.balanceViewModel = balanceViewModel; this.navigationService = navigationService; this.messenger = messenger; this.accountId = accountId; }
/// <summary> /// Default constructor /// </summary> public PaymentListViewModel(ICrudServicesAsync crudServices, IPaymentService paymentService, IDialogService dialogService, ISettingsFacade settingsFacade, IBalanceCalculationService balanceCalculationService, IBackupService backupService, INavigationService navigationService) { this.crudServices = crudServices; this.paymentService = paymentService; this.dialogService = dialogService; this.settingsFacade = settingsFacade; this.balanceCalculationService = balanceCalculationService; this.backupService = backupService; this.navigationService = navigationService; MessengerInstance.Register <PaymentListFilterChangedMessage>(this, LoadPayments); }
public async Task <IActionResult> ChangePubDate(ChangePubDateDto dto, [FromServices] ICrudServicesAsync <BookDbContext> service) { if (!ModelState.IsValid) { return(View(dto)); } await service.UpdateAndSaveAsync(dto); SetupTraceInfo(); if (service.IsValid) { return(View("BookUpdated", new BookUpdatedDto(service.Message, _backToDisplayController))); } //Error state service.CopyErrorsToModelState(ModelState, dto); return(View(dto)); }
public async Task <IActionResult> ChangePubDate(ChangePubDateEventsDto dto, [FromServices] ICrudServicesAsync <SqlEventsDbContext> service) { if (!ModelState.IsValid) { return(View(dto)); } await service.UpdateAndSaveAsync(dto); SetupTraceInfo(); if (service.IsValid) { return(View("BookUpdated", service.Message)); } //Error state service.CopyErrorsToModelState(ModelState, dto); return(View(dto)); }
public async Task <IActionResult> AddPromotion(AddPromotionDto dto, [FromServices] ICrudServicesAsync <BookDbContext> service) { Request.ThrowErrorIfNotLocal(); if (!ModelState.IsValid) { return(View(dto)); } await service.UpdateAndSaveAsync(dto); SetupTraceInfo(); if (!service.HasErrors) { return(View("BookUpdated", new BookUpdatedDto(service.Message, _backToDisplayController))); } //Error state service.CopyErrorsToModelState(ModelState, dto); return(View(dto)); }
public async Task <IActionResult> AddBookReview(AddReviewDto dto, [FromServices] ICrudServicesAsync <BookDbContext> service) { Request.ThrowErrorIfNotLocal(); if (!ModelState.IsValid) { return(View(dto)); } await service.UpdateAndSaveAsync(dto); SetupTraceInfo(); if (service.IsValid) { return(View("BookUpdated", service.Message)); } //Error state service.CopyErrorsToModelState(ModelState, dto); return(View(dto)); }
/// <summary> /// Constructor /// </summary> public PaymentListViewActionViewModel(int accountId, ICrudServicesAsync crudServices, ISettingsFacade settingsFacade, IDialogService dialogService, IBalanceViewModel balanceViewModel, INavigationService navigationService) { this.accountId = accountId; this.crudServices = crudServices; this.settingsFacade = settingsFacade; this.dialogService = dialogService; this.balanceViewModel = balanceViewModel; this.navigationService = navigationService; var accountCount = crudServices.ReadManyNoTracked <AccountViewModel>().Count(); IsTransferAvailable = accountCount >= 2; IsAddIncomeAvailable = accountCount >= 1; IsAddExpenseAvailable = accountCount >= 1; }
/// <summary> /// Default constructor /// </summary> public PaymentListViewModel(ICrudServicesAsync crudServices, IPaymentService paymentService, IDialogService dialogService, ISettingsFacade settingsFacade, IBalanceCalculationService balanceCalculationService, IBackupService backupService, IMvxNavigationService navigationService, IMvxMessenger messenger, IMvxLogProvider logProvider) { this.crudServices = crudServices; this.paymentService = paymentService; this.dialogService = dialogService; this.settingsFacade = settingsFacade; this.balanceCalculationService = balanceCalculationService; this.backupService = backupService; this.navigationService = navigationService; this.messenger = messenger; this.logProvider = logProvider; token = messenger.Subscribe <PaymentListFilterChangedMessage>(LoadPayments); }
/// <summary> /// Creates an CategoryListViewModel for usage when the list including the option is needed. /// </summary> public CategoryListViewModel(ICrudServicesAsync curdServicesAsync, IDialogService dialogService, INavigationService navigationService) : base(curdServicesAsync, dialogService, navigationService) { }