private void fillSupplierCombo() { try { DataSet ds = supplier.getAllSupplierCmb(); DataRow dr = ds.Tables[0].NewRow(); dr["ShopName"] = "-Select Supplier-"; dr["SupplierId"] = "0"; ds.Tables[0].Rows.InsertAt(dr, 0); cmbSupplier.DataSource = ds.Tables[0]; cmbSupplier.DisplayMember = "ShopName"; cmbSupplier.ValueMember = "SupplierId"; } catch (Exception ex) { Common.showDenger(ex.Message); } }
private void fillSupplierCombo() { cmbSupplier.DataSource = supplier.getAllSupplierCmb().Tables[0]; cmbSupplier.DisplayMember = "SupplierName"; cmbSupplier.ValueMember = "SupplierId"; }