예제 #1
0
        protected async Task DeleteAccount()
        {
            if (await dialogService.ShowConfirmMessage(Strings.DeleteTitle, Strings.DeleteAccountConfirmationMessage))
            {
                await crudServices.DeleteAndSaveAsync <Account>(SelectedAccount.Id);

                settingsFacade.LastExecutionTimeStampSyncBackup = DateTime.Now;
                NavigationService.GoBack();
                backupService.EnqueueBackupTask().FireAndForgetSafeAsync();
            }
        }
예제 #2
0
        private async Task DeleteCategory()
        {
            if (await dialogService.ShowConfirmMessage(Strings.DeleteTitle, Strings.DeleteCategoryConfirmationMessage))
            {
                await mediator.Send(new DeleteCategoryByIdCommand(SelectedCategory.Id));

                logManager.Info("Category with Id {id} deleted.", SelectedCategory.Id);

                settingsFacade.LastExecutionTimeStampSyncBackup = DateTime.Now;
                backupService.EnqueueBackupTaskAsync().FireAndForgetSafeAsync();
                await CancelCommand.ExecuteAsync();
            }
        }