public Product_Supplier selectedProductSupplier { get; set; } //the product suppliers selected from the list of active package product suppliers //form constructor, sets active package, fills the product suppliers public frmEditProductSuppliers(Package package) { InitializeComponent(); activePackage = package; Text = activePackage.PkgName; activePackage.fillSuppliers(); }
//set the active package based on the combo box selection private void cbPackages_SelectedIndexChanged(object sender, EventArgs e) { ClearControls(); activePackage = (Package)cbPackages.SelectedItem; activePackage.fillSuppliers(); DisplayPackage(); }