예제 #1
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            Medicine_Data data = new Medicine_Data();

            if (textBox1.Text != "")
            {
                if (textBox2.Text != "")
                {
                    data.Create_Preparation_Record(textBox1.Text, textBox2.Text, Convert.ToInt32(numericUpDown1.Value));
                    MessageBox.Show("Запись успешно создана!", "База данных", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    GlobalVar.needToUpdate_FMedications = true;
                }
                else
                {
                    MessageBox.Show("Не указан штрих-код.", "Добавление данных", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("Не указано наименование.", "Добавление данных", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }