Example #1
0
        private async Task UpdateModelAsync()
        {
            await DialogService.DisplayPopupAsync();

            await SetSelectableStatesAsync();

            ResetNewItemCommand.Execute(null);
            ResetSearchItem();
            ShowItemsCommand.Execute(null);
            await DialogService.PopAsync();
        }
Example #2
0
        private async Task CreateItemAsync()
        {
            if (!await CanCreateItemAsync())
            {
                return;
            }

            await DialogService.DisplayPopupAsync();

            await FirebaseService.InsertItemAsync(NewItem);

            ResetNewItemCommand.Execute(null);

            await ShowItemsAsync();

            await DialogService.PopAsync();
        }
Example #3
0
        private async Task SaveItemAsync()
        {
            if (!await CanSaveItemAsync())
            {
                return;
            }

            await DialogService.DisplayPopupAsync();

            await FirebaseService.UpdateItemAsync(EditItem);

            var i = Category.Items.IndexOf(Category.Items.FirstOrDefault(x => x.ItemID == EditItem.ItemID));

            Category.Items[i] = EditItem;
            ResetNewItemCommand.Execute(null);
            await DialogService.DisplayPopupAsync();
        }
Example #4
0
 private void ResetPanelItems()
 {
     ResetNewItemCommand.Execute(null);
     ResetSearchItemCommand.Execute(null);
 }