Example #1
0
        private void DisplayProdSupId()
        {
            using (travelexpertsDataContext db = new travelexpertsDataContext())
            {
                int prodId = Convert.ToInt32(prodNameComboBox.SelectedValue);
                int supId  = Convert.ToInt32(supNameComboBox.SelectedValue);

                productSupplierIdTextBox.Text = TravelExpertsQueryManager.FindProdSuppID(db, prodId, supId).ToString();
            }
        }
        // Updates the display of the prodsuppID
        private void RefreshProdSupId()
        {
            using (travelexpertsDataContext db = new travelexpertsDataContext())
            {
                int prodId = Convert.ToInt32(productIdComboBox.SelectedValue);                                          // grabs id from product dropdown
                int supId  = Convert.ToInt32(supplierIdComboBox.SelectedValue);                                         // grabs id from supplier dropdown

                productSupplierIdTextBox.Text = TravelExpertsQueryManager.FindProdSuppID(db, prodId, supId).ToString(); // uses that data to grab the corresponding prodsup id
            }
        }