private void ToogleTable(object param = null) { CropTable.Clear(); if (ShowingAll == false) { ShowCropsInCultivation(); _showingAll = true; } else { ShowAllCrops(); _showingAll = false; } }
private void BuildTable(IEnumerable <Crop> crops) { foreach (var crop in crops) { CropTable.Add( new Crop { Id = crop.Id, Name = crop.Name, Stage = crop.Stage, Type = crop.Type, Area = crop.Area, NumContainers = crop.NumContainers, StorageRequired = crop.StorageRequired, ProductName = crop.ProductName, ProductId = crop.ProductId }); } }