private void updateComboBox() { transports = TransportModel.GetAllTransports(); Transports.Items.Clear(); Transports.Items.Add("Transports"); Transports.SelectedIndex = 0; Transports.Items.AddRange(transports.ToArray()); }
private void NovaLinija_Load(object sender, EventArgs e) { transports = TransportModel.GetAllTransports(); comboBox1.Items.Clear(); comboBox1.Items.Add("Transports"); comboBox1.SelectedIndex = 0; comboBox1.Items.AddRange(transports.ToArray()); }