private void setvozila() { List <Vehical> routs; routs = VehicalModel.GetAllVehical(); dataGridView1.DataSource = routs; }
private void initNewData() { List <MongoLayer.Models.Vehical> vc = VehicalModel.GetAllVehical(ts.Id); comboBox2.Items.Add("Vihecals"); comboBox2.Items.AddRange(vc.ToArray()); comboBox2.SelectedIndex = 0; }
private void initData() { dateTimePicker1.Value = ride.StartTime; dateTimePicker2.Value = ride.EndTime; int i; List <MongoLayer.Models.Vehical> vc = VehicalModel.GetAllVehical(ts.Id); for (i = 0; i < vc.Count; i++) { if (vc[i].Id == ride.Vehical.Id) { break; } } comboBox2.Items.AddRange(vc.ToArray()); comboBox2.SelectedIndex = i; }