private void itemComboBox_SelectedIndexChanged(object sender, EventArgs e) { dataTable = _stockInManager.GetAvailableQuantityAndReorderLevel(Convert.ToInt32(categoryComboBox.SelectedValue), Convert.ToInt32(companyComboBox.SelectedValue), itemComboBox.Text); if (dataTable.Rows.Count > 0) { reorderLevelTextBox.Text = dataTable.Rows[0]["ReorderLevel"].ToString(); availableQuantityTextBox.Text = dataTable.Rows[0]["AvailableQuantity"].ToString(); } //Display on DataGridView DisplayRecords(); }
private void comboBoxItemName_SelectedIndexChanged(object sender, EventArgs e) { _dataTable = _stockInManager.GetAvailableQuantityAndReorderLevel(Convert.ToInt32(comboBoxCategoryName.SelectedValue), Convert.ToInt32(comboBoxCompanyName.SelectedValue), comboBoxItemName.Text); if (_dataTable.Rows.Count > 0) { textBoxReorderLevel.Text = _dataTable.Rows[0]["ReorderLevel"].ToString(); textBoxAvailableQuantity.Text = _dataTable.Rows[0]["AvailableQuantity"].ToString(); } //Display on DataGridView DisplayAllRecords(); }