protected async override Task OnInitializedAsync() { NewRoom = new CreateRoomRequest(); Carpet = await CarpetService.GetAllCarpetAsync(); Carpet = Carpet.OrderBy(c => c.Brand).ThenBy(c => c.Name).ToList(); }
public async Task ShowDeleteCarpetConfirmationModal(Guid CarpetId) { var RemoveCarpetModal = Modal.Show <Confirmation>("Are you sure you would like to delete this carpet?"); var result = await RemoveCarpetModal.Result; if (!result.Cancelled) { await CarpetService.DeleteCarpetAsync(CarpetId); await Refresh(); } }
public async Task Refresh() { Carpet = await CarpetService.GetOneCarpetAsync(CarpetId); }
public async Task Refresh() { Carpets = await CarpetService.GetAllCarpetAsync(); Carpets = Carpets.OrderBy(c => c.Brand).ThenBy(c => c.Name).ToList(); }
public void Confirm(UpdateCarpetRequest carpetRequest) { CarpetService.UpdateCarpetAsync(carpetRequest); ModalInstance.CloseAsync(); }
protected async override Task OnInitializedAsync() { Carpets = await CarpetService.GetAllCarpetAsync(); await Refresh(); }
public async Task AddNewCarpet(CreateCarpetRequest AddCarpet) { await CarpetService.AddNewCarpetAsync(AddCarpet); await ModalInstance.CloseAsync(); }