Ejemplo n.º 1
0
        private void cbModel_SelectedIndexChanged(object sender, EventArgs e)
        {
            cbType.Text = "";
            try
            {
                cbType.Items.Clear();

                if (cbModel.SelectedIndex.ToString() != "")
                {
                    List <string> modelNumbers = CC.GetModelNumbers(cbModel.SelectedItem.ToString());
                    cbType.Items.Add("");

                    foreach (string s in modelNumbers)
                    {
                        cbType.Items.Add(s);
                    }
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Connection error");
            }
        }