private void PopulateChargesTree(ChargeCategories categories) { if (categories == null) { return; } categories.Categories.ForEach(x => { var parent = chargesTree.AddNode(x.Name); x.Charges.ForEach(charge => TransverseCharges(parent, charge)); }); }
private static void PopulateWarrantCharges(ChargeCategories categories) { if (categories == null) { return; } if (Globals.WantedReasons == null) { Globals.WantedReasons = new List <String>(); } categories.Categories.ForEach(x => { String categoryName = x.Name; x.Charges.ForEach(charge => TransverseCharges(categoryName, charge)); }); }
private void PopulateChargeCategories() { if (SelectedBuildingName != null) { if (SelectedChargeCategoryName == null) { SettleChargeCategories = new ObservableCollection <BuildingChargeBasisCategory>(); AvailableChargeCategories = new ObservableCollection <BuildingChargeBasisCategory>(ChargeCategories); } else { SettleChargeCategories = new ObservableCollection <BuildingChargeBasisCategory>(ChargeCategories.Where(x => x.BuildingChargeBasisCategoryId.Equals(SelectedChargeCategoryName.BuildingChargeBasisCategoryId))); AvailableChargeCategories = new ObservableCollection <BuildingChargeBasisCategory>(ChargeCategories.Where(x => !x.BuildingChargeBasisCategoryId.Equals(SelectedChargeCategoryName.BuildingChargeBasisCategoryId))); } } }