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