private void RadioButton3_CheckedChanged_1(object sender, EventArgs e) { //panelProductSuppliers.Show();20190604 //20190604-- panel25.BringToFront(); //panel25.Visible = true; //--20190604 comboBox3.DataSource = ProductsDB.GetProducts(); comboBox3.DisplayMember = "ProdName"; comboBox3.ValueMember = "ProductId"; int fid; bool parseOK = Int32.TryParse(comboBox3.SelectedValue.ToString(), out fid); comboBox4.DataSource = Products_SuppliersDB.GetSuppliersByProductID(fid); comboBox4.DisplayMember = "SupName"; comboBox4.ValueMember = "SupplierId"; comboBox7.DataSource = ProductsDB.GetProducts(); comboBox7.DisplayMember = "ProdName"; comboBox7.ValueMember = "ProductId"; comboBox6.DataSource = Products_SuppliersDB.GetSuppliersByProductID(fid); comboBox6.DisplayMember = "SupName"; comboBox6.ValueMember = "SupplierId"; }
private void ComboBox7_SelectedIndexChanged(object sender, EventArgs e) { int fid; bool parseOK = Int32.TryParse(comboBox7.SelectedValue.ToString(), out fid); comboBox6.DataSource = Products_SuppliersDB.GetSuppliersByProductID(fid); comboBox6.DisplayMember = "SupName"; comboBox6.ValueMember = "SupplierId"; }
private void LoadSupplierBox(int id) { sList = Products_SuppliersDB.GetSuppliersByProductID(id); listBox2.DataSource = null; if (sList.Capacity != 0) { listBox2.DataSource = sList; listBox2.DisplayMember = "SupName"; listBox2.SetSelected(0, true); } }