コード例 #1
0
ファイル: DBO.cs プロジェクト: BrandonCuthbertson/WUBERG-NEEL
        public static bool AddProdToSupplier(int prodID, int supplierID)
        {
            Products_Suppliers pd = new Products_Suppliers();

            pd.ProductId  = prodID;
            pd.SupplierId = supplierID;
            return(SQLAdapter.SQLAdapter.InsertToDB <Products_Suppliers>(pd, new TravelExpertsDBCon()));
        }
コード例 #2
0
        private void btnAddProdtoSup_Click(object sender, EventArgs e)
        {
            Products_Suppliers ps = new Products_Suppliers();

            ps.ProductId         = products[cmbProducts.SelectedIndex].ProductId;
            ps.ProductSupplierId = suppliers[cboSuppliers.SelectedIndex].SupplierId;
            SQLAdapter.SQLAdapter.InsertToDB <Products_Suppliers>(ps, new TravelExpertsDBCon());
            Application.Restart();
        }