private void UpdateItemFields() { // check expiry date on cached data Schedule s = ItemCache.GetCurrentSchedule(); if (s.Expiry > DateTime.Now) { // schedule is in-date, update the fields List <Item> l = s.Items; ItemInfo = new Dictionary <string, Item>(); l.ForEach(it => ItemInfo.Add(it.Number, it)); itemsField = new Dictionary <string, string>(); l.ForEach(it => itemsField.Add(it.Number, it.Description)); // update GUI UpdateItemList(); } }