protected async override Task OnInitializedAsync()
        {
            NewRoom = new CreateRoomRequest();
            Carpet  = await CarpetService.GetAllCarpetAsync();

            Carpet = Carpet.OrderBy(c => c.Brand).ThenBy(c => c.Name).ToList();
        }
Ejemplo n.º 2
0
        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();
            }
        }
Ejemplo n.º 3
0
 public async Task Refresh()
 {
     Carpet = await CarpetService.GetOneCarpetAsync(CarpetId);
 }
Ejemplo n.º 4
0
        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();
 }
Ejemplo n.º 6
0
 protected async override Task OnInitializedAsync()
 {
     Carpets = await CarpetService.GetAllCarpetAsync();
     await Refresh();
 }
Ejemplo n.º 7
0
        public async Task AddNewCarpet(CreateCarpetRequest AddCarpet)
        {
            await CarpetService.AddNewCarpetAsync(AddCarpet);

            await ModalInstance.CloseAsync();
        }