private void searchCompanyComboBox_SelectedIndexChanged(object sender, EventArgs e) { searchCategoryComboBox.Text = ""; searchCategoryComboBox.Items.Clear(); string selectedCompany = searchCompanyComboBox.Text; StockInCategoryComboManager sInCatgComboMangObj = new StockInCategoryComboManager(); DataTable dt = sInCatgComboMangObj.GetCategoryNames(selectedCompany); for (int i = 0; i < dt.Rows.Count; i++) { searchCategoryComboBox.Items.Add(dt.Rows[i]["Category"]); } }
private void companyStockOutComboBox_SelectedIndexChanged(object sender, EventArgs e) { categoryStockOutComboBox.Text = ""; categoryStockOutComboBox.Items.Clear(); reorderStockOutLavelTextBox.Text = ""; availableQuantityStockOutTextBox.Text = ""; itemStockOutComboBox.Text = ""; string selectedCompany = companyStockOutComboBox.Text; DataTable dt = sInCatgComboMangObj.GetCategoryNames(selectedCompany); for (int i = 0; i < dt.Rows.Count; i++) { categoryStockOutComboBox.Items.Add(dt.Rows[i]["Category"]); } }