private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { comboBox3.Enabled = true; db = new GreenHouseDataContext(); if (comboBox2.SelectedItem.ToString() == "LAVORO TERRA") { var foo = from s in db.LAVORI where s.Categoria == "LAVORO TERRA" select s.Nome; comboBox3.DataSource = foo; } if (comboBox2.SelectedItem.ToString() == "LAVORO PIANTA") { var foo = from s in db.LAVORI where s.Categoria == "LAVORO PIANTA" select s.Nome; comboBox3.DataSource = foo; } if (comboBox2.SelectedItem.ToString() == "TRATTAMENTO") { var foo = from s in db.LAVORI where s.Categoria == "TRATTAMENTO" select s.Nome; comboBox3.DataSource = foo; } }
public FormGuida() { InitializeComponent(); db = new GreenHouseDataContext(); }
public FormRicercatore2() { InitializeComponent(); db = new GreenHouseDataContext(); }
public FormViaggio() { InitializeComponent(); db = new GreenHouseDataContext(); }
public FormManutenzioni() { InitializeComponent(); db = new GreenHouseDataContext(); }
public FormGestoreStruttura() { InitializeComponent(); db = new GreenHouseDataContext(); }
public FormSupervisore() { InitializeComponent(); db = new GreenHouseDataContext(); }
public FormGestoreEsperimenti2() { InitializeComponent(); db = new GreenHouseDataContext(); }