private void AddPhone_Load(object sender, EventArgs e) { var manufacturers = _manufacturerServiceClient.GetAll(); comboBoxManufacturer.DataSource = new BindingSource(manufacturers, null); comboBoxManufacturer.DisplayMember = "Name"; comboBoxManufacturer.ValueMember = "Id"; }
private void AddProducts_Load(object sender, EventArgs e) { var manufacturers = _manufacturerServiceClient.GetAll(); var connectionTypes = _connectionTypeServiceClient.GetAll(); var screenTypes = _screenTypeServiceClient.GetAll(); SetUpPhonesGrid(manufacturers); SetUpElectronicBooksGrid(manufacturers, screenTypes); SetUpSmartWatchesGrid(manufacturers, connectionTypes); }
private void AddSmartWatch_Load(object sender, EventArgs e) { var manufacturers = _manufacturerServiceClient.GetAll(); comboBoxManufacturer.DataSource = new BindingSource(manufacturers, null); comboBoxManufacturer.DisplayMember = "Name"; comboBoxManufacturer.ValueMember = "Id"; var connectionTypes = _connectionTypeServiceClient.GetAll(); comboBoxConnectionType.DataSource = new BindingSource(connectionTypes, null); comboBoxConnectionType.DisplayMember = "Name"; comboBoxConnectionType.ValueMember = "Id"; }
private void AddElectronicBook_Load(object sender, EventArgs e) { var manufacturers = _manufacturerServiceClient.GetAll(); comboBoxManufacturer.DataSource = new BindingSource(manufacturers, null); comboBoxManufacturer.DisplayMember = "Name"; comboBoxManufacturer.ValueMember = "Id"; var screenTypes = _screenTypeServiceClient.GetAll(); comboBoxScreenType.DataSource = new BindingSource(screenTypes, null); comboBoxScreenType.DisplayMember = "Name"; comboBoxScreenType.ValueMember = "Id"; }