/// <summary> /// EVENTS /// </summary> private void buttonForSavingSymptom_Click(object sender, EventArgs e) { Symptoms s = new Symptoms(); s.Description = textBox1.Text; s.Date = DateTime.Now; dbde.Symptoms.Add(s); dbde.SaveChanges(); MessageBox.Show("Saved"); this.Close(); }
private void comboBoxForSymptoms_SelectedIndexChanged(object sender, EventArgs e) { Symptoms s = (Symptoms)comboBoxForSymptoms.SelectedItem; this.textBox1.Text = s.Description; }