private void comboBox_Firm_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox_Firm.SelectedIndex == 0) { comboBox_Stall.Enabled = false; comboBox_Stall.Text = ""; comboBox_Stall.Items.Clear(); return; } comboBox_Stall.Enabled = true; string[] szFirmInf = comboBox_Firm.Text.Split('-'); miFirmID = Convert.ToInt16(szFirmInf[0]); MyFunc.DispStall(comboBox_Firm, comboBox_Stall, true); if (comboBox_Stall.Items.Count > 0) { comboBox_Stall.SelectedIndex = 0; } }
private void comboBox_Firm_SelectedIndexChanged(object sender, EventArgs e) { //if (comboBox_Firm.SelectedIndex > 0) // comboBox_Stall.Enabled = true; //else //{ // comboBox_Stall.Enabled = false; // comboBox_Stall.Text = ""; // return; //} string[] szFirmInf = comboBox_Firm.Text.Split('-'); miFirmID = Convert.ToInt16(szFirmInf[0]); MyFunc.DispStall(comboBox_Firm, comboBox_Stall, true); if (comboBox_Stall.Items.Count > 0) { comboBox_Stall.SelectedIndex = 0; } GridDataRefresh(miFirmID, 0); }
private void comboBox_NameS_SelectedIndexChanged(object sender, EventArgs e) { comboBox_Rent.Items.Clear(); comboBox_Rent.Text = ""; textBox_PersonS.Text = ""; textBox_TelS.Text = ""; textBox_CertIDS.Text = ""; MyFunc.DispStall(comboBox_NameS, comboBox_Rent, false); if (comboBox_Rent.Items.Count > 0) { comboBox_Rent.SelectedIndex = 0; button_CardS.Enabled = true; button_SaveS.Enabled = true; } else { button_CardS.Enabled = false; button_SaveS.Enabled = false; } }