private void PopulateDropDown() { try { cbCat.DataSource = ProductClass.PopulateDropDown().Tables[0].DefaultView; cbCat.DisplayMember = "Name"; cbCat.ValueMember = "CatID"; } catch (Exception ex) { MetroMessageBox.Show(this, "Error while getting category list\nDetails: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }
private void PopulateDropDown() { cboCat.DataSource = ProductClass.PopulateDropDown().Tables[0].DefaultView; cboCat.DisplayMember = "Name"; cboCat.ValueMember = "CatID"; }
private void PopulateDGV() { dgv.DataSource = ProductClass.SelectProducts().Tables[0].DefaultView; }
private void PopulateUnits() { cboUnit.DataSource = ProductClass.PopulateMeasurementDropDown().Tables[0].DefaultView; cboUnit.DisplayMember = "Name"; cboUnit.ValueMember = "MeasurementID"; }