private void cmbCategory_SelectionChangeCommitted(object sender, EventArgs e) { DataSet dsOrders = DbAccess.ReturnDataSet("Select * From Products Where SupplierID =" + cmbCategory.SelectedValue.ToString()); dgvOrder.DataSource = dsOrders.Tables[0].DefaultView; }
private void cmbOrders_SelectionChangeCommitted(object sender, EventArgs e) { DataSet dsOrders = DbAccess.ReturnDataSet("Select * From Orders Where CustomerID ='" + cmbOrders.SelectedValue.ToString() + "'"); dgvCustomers.DataSource = dsOrders.Tables[0].DefaultView; }