Esempio n. 1
0
 private void DeleteAsset(int id)
 {
     Belligerent.Assets.Remove(Belligerent.Assets.FirstOrDefault(b => b.AssetId == id));
     EventParticipantDataService.Update(Belligerent.EventParticipantId, Belligerent);
     AssetDataService.Delete(id);
     StateHasChanged();
 }
Esempio n. 2
0
        public async void AddUnitAssetDialog_OnAssetAdded(Asset asset)
        {
            asset.EventParticipantId = Belligerent.EventParticipantId;
            var entry = await AssetDataService.Add(asset);

            Belligerent.Assets.Add(entry);
            await EventParticipantDataService.Update(Belligerent.EventParticipantId, Belligerent);

            StateHasChanged();
        }