예제 #1
0
파일: AddNewSymptom.cs 프로젝트: kNalj/Food
        /// <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();
        }
예제 #2
0
파일: AddNewSymptom.cs 프로젝트: kNalj/Food
        private void comboBoxForSymptoms_SelectedIndexChanged(object sender, EventArgs e)
        {
            Symptoms s = (Symptoms)comboBoxForSymptoms.SelectedItem;

            this.textBox1.Text = s.Description;
        }