private void comboBoxEdit5_SelectedIndexChanged(object sender, EventArgs e) { string x = comboBoxEdit3.Text; comboBoxEdit3.Properties.Items.Clear(); string te = ""; //if (stat == "500" || stat == "220" || stat == "110") // te = "S1='"+stat+"' and "; IList <string> strList = oper.GetLineName(te + "S5='1' and Type='" + comboBoxEdit5.Text + "'"); foreach (string str in strList) { comboBoxEdit3.Properties.Items.Add(str); } comboBoxEdit3.SelectedIndex = 0; if (x == comboBoxEdit3.Text) { comboBoxEdit7.Properties.Items.Clear(); //if (stat == "500" || stat == "220" || stat == "110") // te = "S1='" + stat + "' and "; IList <string> strList1 = oper.GetLineT5(te + "S5='1' and Type='" + comboBoxEdit5.Text + "' and Name='" + comboBoxEdit3.Text + "'"); foreach (string str in strList1) { comboBoxEdit7.Properties.Items.Add(str); } comboBoxEdit7.SelectedIndex = 0; } }