private void SetDefaultUnitPrice(UsageDetailViewModel detail) { if (detail == null) { return; } var consumable = consumableService.Get(detail.ConsumableId); detail.UnitPrice = consumable.UnitPrice; }
private void OnLoadConsumable(object param) { var loadedConsumable = consumableService.Get((Guid)param); //TODO: consider using automapper Id = loadedConsumable.Id; Name = loadedConsumable.Name; Type = loadedConsumable.Type; Unit = loadedConsumable.Unit; UnitPrice = loadedConsumable.UnitPrice; Active = loadedConsumable.Active; AdjustUnit(); }