public async Task ShowRemoveRetailerModalAsync(Guid RetailerId)
        {
            var DeleteRetailerModal = Modal.Show <Confirmation>("Are you sure you want to delete this Retailer?");
            var result = await DeleteRetailerModal.Result;

            if (!result.Cancelled)
            {
                var Installers = await InstallerService.GetAllInstallersByRetailerIdAsync(RetailerId);

                foreach (var installer in Installers)
                {
                    await InstallerService.DeleteInstallerAsync(installer.Id);
                }
                await RetailerService.DeleteRetailerAsync(RetailerId);
                await Refresh();
            }
        }
Esempio n. 2
0
        public async Task Refresh()
        {
            Retailer = await RetailerService.GetOneRetailerAsync(RetailerId);

            Installers = await InstallerService.GetAllInstallersByRetailerIdAsync(RetailerId);
        }