Example #1
0
        public async void DeleteAllBankNotifyAsync()
        {
            await _notifyService.DeleteAllBankNotifiesAsync();

            BankNotifies.Clear();
            SelectedBankNotify = new BankNotifyItemViewModel();
        }
Example #2
0
        public async void DeleteBankNotifyAsync()
        {
            if (_selectedBankNotify.Id != 0)
            {
                await _notifyService.DeleteBankNotifyAsync(GenereateBankNotifyModelFromViewModel(_selectedBankNotify));

                BankNotifies.Remove(_selectedBankNotify);
                SelectedBankNotify = new BankNotifyItemViewModel();
            }
        }
Example #3
0
        public async void LoadAsync()
        {
            await _notifyService.Initialize();

            var notifies = await _notifyService.GetBankNotifiesAsync();

            foreach (var notify in notifies)
            {
                BankNotifies.Add(GenerateBankNotifyItemViewModelFromModel(notify));
            }
        }
Example #4
0
        public async void SaveBankNotifyAsync(BankNotifyItemViewModel model)
        {
            if (_selectedBankNotify.Id == 0)
            {
                if (String.IsNullOrWhiteSpace(model.DisplayName) && String.IsNullOrWhiteSpace(model.Description))
                {
                    return;
                }

                var notifyModel = await _notifyService.CreateBankNotifyAsync(GenereateBankNotifyModelFromViewModel(model));

                BankNotifies.Add(GenerateBankNotifyItemViewModelFromModel(notifyModel));
                SelectedBankNotify = new BankNotifyItemViewModel();
            }
            else
            {
                await _notifyService.UpdateBankNotifyAsync(GenereateBankNotifyModelFromViewModel(_selectedBankNotify));
            }
        }