Exemple #1
0
        private void ComboBox_DropDownClosed(object sender, EventArgs e)
        {
            string   s   = comboBox1.Text;
            ComboBox cmb = sender as ComboBox;


            if (s != "Make Selection...")
            {
                InspectionService inspectionService = new InspectionService();
                var           Manholes = inspectionService.GetManholeByDrainageArea(s);
                List <Author> authors  = new List <Author>();
                foreach (var manhole in Manholes)
                {
                    authors.Add(new Author()
                    {
                        Manhole = manhole
                    });
                }

                dataGrid1.ItemsSource = authors;
            }
            else
            {
                dataGrid1.ItemsSource = null;
            }
        }