Ejemplo n.º 1
0
        private async Task Delete(Guid id)
        {
            var product = Products.FirstOrDefault(p => p.Id.Equals(id));

            var confirmed = await Js.InvokeAsync <bool>("confirm", $"Are you sure you want to delete {product.Name} product?");

            if (confirmed)
            {
                await OnDeleted.InvokeAsync(id);
            }
        }
Ejemplo n.º 2
0
        private async Task Delete(int id)
        {
            var apartment = Apartments.FirstOrDefault(p => p.Id.Equals(id));

            var confirmed = await Js.InvokeAsync <bool>("confirm", $"Are you sure you want to delete the apartment with Id: {apartment.Id}?");

            if (confirmed)
            {
                await OnDeleted.InvokeAsync(id);
            }
        }
Ejemplo n.º 3
0
        private async Task Delete(int id)
        {
            var region = Regions.FirstOrDefault(p => p.Id.Equals(id));

            var confirmed = await Js.InvokeAsync <bool>("confirm", $"Are you sure you want to delete the region with name: {region.Name}?");

            if (confirmed)
            {
                await OnDeleted.InvokeAsync(id);
            }
        }
        private async Task Delete(int id)
        {
            var car = Cars.FirstOrDefault(p => p.Id.Equals(id));

            var confirmed = await Js.InvokeAsync <bool>("confirm", $"Delete car with id: {car.Id}?");

            if (confirmed)
            {
                await OnDeleted.InvokeAsync(id);
            }
        }
Ejemplo n.º 5
0
        private async Task Delete(int id)
        {
            var house = Houses.FirstOrDefault(p => p.Id.Equals(id));

            var confirmed = await Js.InvokeAsync <bool>("confirm", $"Are you sure you want to delete the house with Id: {house.Id}?");

            if (confirmed)
            {
                await OnDeleted.InvokeAsync(id);
            }
        }
        private async Task Delete(int id)
        {
            var manufacturer = Manufacturers.FirstOrDefault(p => p.Id.Equals(id));

            var confirmed = await Js.InvokeAsync <bool>("confirm", $"Delete: {manufacturer.Name}?");

            if (confirmed)
            {
                await OnDeleted.InvokeAsync(id);
            }
        }
        protected async Task OnDeleteClicked()
        {
            await Http.DeleteAsync($"api/cart/lines/{Details.Id}");

            await OnDeleted.InvokeAsync(Details);
        }