StringBuilder sb = new StringBuilder(); int count = 0; foreach (var item in items) { if(count == 0) sb.Append(string.Format("{0} > {1}", item.Key, item.Value)); else sb.Append(string.Format(" and {0} > {1}", item.Key, item.Value)); count++; } query.Where = sb.ToString();
private Dictionary<string, int> items = new Dictionary<string, int>(); private void CheckBox_Click(object sender, RoutedEventArgs e) { CheckBox cb = sender as CheckBox; string key = (string) cb.Content; if (items.ContainsKey(key)) items.Remove(key); else items.Add(key, Convert.ToInt32(NumValue.Text.Trim())); }
RadioButton rb = sender as RadioButton if(rb == this.StreetsRadioButton){} else if(rb == this.TopoRadioButton){} else{}
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.