private void btnUpdateCaseAvailCount_Click(object sender, RoutedEventArgs e) { if (trvZipCodes.SelectedItems != null && trvZipCodes.SelectedItems.Count > 0) { RadTreeViewItem item = trvZipCodes.SelectedItems[0] as RadTreeViewItem; if (((string)item.Tag) == "State") { ZipGeoCodeService.UpdateStatsForState(((string)item.Header).Substring(0, 2)); GridSelectedZipCodes.ItemsSource = ZipGeoCodeService.GetForState(((string)item.Header).Substring(0, 2), (float)_selectedDealer.Latitude, (float)_selectedDealer.Longitude, (float)_selectedDealer.MaxDistance); GridSelectedZipCodes.Rebind(); SelectZipCodes(); } else { ZipGeoCodeService.UpdateStatsForZipPart(((string)item.Header).Substring(0, 3)); GridSelectedZipCodes.ItemsSource = ZipGeoCodeService.GetForZipPart((string)item.Header, (float)_selectedDealer.Latitude, (float)_selectedDealer.Longitude, (float)_selectedDealer.MaxDistance); SelectZipCodes(); } } }
private void btnSelectAll_Click(object sender, RoutedEventArgs e) { GridSelectedZipCodes.SelectAll(); }