Example #1
0
        //Открытие формы добавления
        private void button1_Click(object sender, EventArgs e)
        {
            string state = "add";
            AddOrEditProductForm addOrEdit = new AddOrEditProductForm(state, choosenProduct);

            addOrEdit.ShowDialog();
            update();
        }
Example #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (choosenProduct == "")
            {
                MessageBox.Show("Вы ничего не выбрали!");
            }
            else
            {
                string state = "edit";
                AddOrEditProductForm addOrEdit = new AddOrEditProductForm(state, choosenProduct);

                addOrEdit.ShowDialog();
                update();
            }
        }