async Task ConfirmRestoreProduct() { try { await OnProductRestoreConfirmed.InvokeAsync(selectedProduct); } finally { selectedProduct = null; } }
async Task RestoreProduct(ProductListModel.ListItem product) { loading = true; try { await Client.RestoreProduct(product.Id); await LoadProducts(queryModel); } finally { loading = false; } }
void RestoreProduct(ProductListModel.ListItem item) { selectedProduct = item; confirmRestoreModal.Show(); }
void DeleteProduct(ProductListModel.ListItem item) { selectedProduct = item; confirmDeleteModal.Show(); }
async Task OpenProductDetail(ProductListModel.ListItem item) => await OnProductDetailOpened.InvokeAsync(item);
void OpenProductDetail(ProductListModel.ListItem product) { var url = $"catalog/products/{product.Id}"; Navigation.NavigateTo(url); }