/// <summary> /// Function to fill brand combobox /// </summary> public void BrandComboFill() { try { listObj = TrGeneralFill.BrandViewAll(cmbBrand, true); } catch (Exception ex) { MessageBox.Show("PR5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void BrandComboFill() { try { List <DataTable> listObj = new List <DataTable>(); listObj = TransactionsGeneralFillObj.BrandViewAll(cmbBrand, true); cmbBrand.DataSource = listObj[0]; cmbBrand.DisplayMember = "brandName"; cmbBrand.ValueMember = "brandId"; } catch (Exception ex) { MessageBox.Show("PS03:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }