private void frmSpreadsheetControl_Load(object sender, EventArgs e) { try { ESupplier ObjESupplier = new ESupplier(); BSupplier ObjBSupplier = new BSupplier(); ObjBSupplier.GetSupplier(ObjESupplier); cmbSupplier.DataSource = ObjESupplier.dtSupplier; cmbSupplier.DisplayMember = "FullName"; cmbSupplier.ValueMember = "SupplierID"; } catch (Exception ex) { Utility.ShowError(ex); } }
private void frmLoadSupplier_Load(object sender, EventArgs e) { try { if (Utility.SupplierDataAccess == "7") { btnAddAddress.Enabled = false; btnAddArticles.Enabled = false; btnAddContact.Enabled = false; } ObjESupplier = ObjBSupplier.GetSupplier(ObjESupplier); BindSupplierData(); if (ObjESupplier.dtSupplier != null && ObjESupplier.dtSupplier.Rows.Count > 0) { cmbSupplier.EditValue = ObjESupplier.dtSupplier.Rows[0][0]; } } catch (Exception ex) { Utility.ShowError(ex); } }