protected async override void Add() { CRUDType = CRUDType.Adding; CRUDState = CRUDCardState.Busy; await Task.Delay(2000); await DataAccess.AddAsset(NewItem); SelectedItem = NewItem; CRUDState = CRUDCardState.Default; }
protected async override void Duplicate() { CRUDType = CRUDType.Copying; CRUDState = CRUDCardState.Busy; Asset newItem = new Asset(); newItem.AssetCategory = new AssetCategory(); DataAccess.CopyProperties(typeof(Asset), newItem, SelectedItem); newItem.Id = 0; await DataAccess.AddAsset(newItem); SelectedIndex = DataAccess.Assets.Count - 1; CRUDState = CRUDCardState.Default; }