Esempio n. 1
0
 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;
     }
 }
Esempio n. 2
0
 private void PopulateDropDown()
 {
     cboCat.DataSource    = ProductClass.PopulateDropDown().Tables[0].DefaultView;
     cboCat.DisplayMember = "Name";
     cboCat.ValueMember   = "CatID";
 }
Esempio n. 3
0
 private void PopulateDGV()
 {
     dgv.DataSource = ProductClass.SelectProducts().Tables[0].DefaultView;
 }
Esempio n. 4
0
 private void PopulateUnits()
 {
     cboUnit.DataSource    = ProductClass.PopulateMeasurementDropDown().Tables[0].DefaultView;
     cboUnit.DisplayMember = "Name";
     cboUnit.ValueMember   = "MeasurementID";
 }