private void StockInForm_Load(object sender, EventArgs e) { _dataTable = _stockInManager.CompanyDataBindToCombobox(); comboBoxCompanyName.DataSource = _dataTable; if (_dataTable.Rows.Count == 0) { comboBoxCompanyName.Text = ""; MessageBox.Show("Company not available in record!"); } //category _dataTable = _stockInManager.CategoryDataBindToCombobox(); comboBoxCategoryName.DataSource = _dataTable; if (_dataTable.Rows.Count == 0) { comboBoxCompanyName.Text = ""; MessageBox.Show("Category not available in record!"); } TextBoxDefaultValue(); DisplayAllRecords(); }