Example #1
0
        void RefreshDistricts()
        {
            if (Region != null)
            {
                Districts = new ObservableCollection <District>(
                    (from district in Session.DataModel.Districts
                     where district.RegionId == Region.Id
                     orderby district.Name
                     select district));
            }
            else
            {
                Districts = new ObservableCollection <District>();
            }

            if (!Districts.Contains(District))
            {
                District = null;
            }
        }