public EventVoucherListViewModel(IVoucherService voucherService, INavigationService navigationService, IUIServices uiServices) : base(uiServices) { _voucherService = voucherService; _navigationService = navigationService; FetchEventVoucherListCommand = new DelegateCommand(async() => { Event.VoucherList = await _voucherService.GetVouchers(Event.Id); }); }
private async void GetEventVoucherListCommandAction() { Event.Vouchers = await _voucherService.GetVouchers(Event.Id); if (Event.Vouchers != null) { await _voucherRepository.RemoveAllAsync(); await _voucherRepository.AddAllAsync(Event.Vouchers); } RaisePropertyChanged("Event"); }
public IHttpActionResult GetComVouchers() { return(Ok(_voucherService.GetVouchers())); }
public List <Voucher> Get() { var vouchers = voucherService.GetVouchers(); return(vouchers); }
public IEnumerable <PublicVoucherDTO> GetPublicVouchersView() { return(voucherService.GetVouchers().Select(x => new PublicVoucherDTO(x))); }