private void companyNameComboBox_SelectedValueChanged(object sender, EventArgs e) { StockInOutManager _stockInOutManager = new StockInOutManager(); //if (count.Rows.Count > 0) // categoryComboBox.DataSource = _itemManager.LoadCategory(); Company company = new Company(); company.CompanyID = Convert.ToInt32(companyNameComboBox.SelectedValue); DataTable count3 = _stockInOutManager.LoadItem(company); itemNameComboBox.DataSource = count3; }
private void StockIn_Load(object sender, EventArgs e) { //CategoryManager _categoryManager = new CategoryManager(); StockInOutManager _stockInOutManager = new StockInOutManager(); ItemManager _itemManager = new ItemManager(); DataTable count = _itemManager.LoadCategory(); categoryNameComboBox.DataSource = count; //if (count.Rows.Count > 0) // categoryComboBox.DataSource = _itemManager.LoadCategory(); DataTable count2 = _itemManager.LoadCompany(); companyNameComboBox.DataSource = count2; }