Example #1
0
        private void buttonAddJob_Click(object sender, EventArgs e)
        {
            if (textBoxName.Text == "" || textBoxName.Text == "Все болезни")
            {
                MessageBox.Show("Введите название болезни");
            }
            else
            {
                string  illnessName = textBoxName.Text;
                string  illnessInfo = textBoxInfo.Text;
                string  result;
                Illness newIllness;


                newIllness = ControlFunctions.CreateIllness(illnessInfo, illnessName);
                result     = ControlFunctions.AddIllness(newIllness);
                if (result != null)
                {
                    MessageBox.Show(result, "Ошибка");
                }


                ReloadForm(true);
            }
        }