Esempio n. 1
0
        private void BtnAddProd_Click(object sender, EventArgs e)
        {
            if (tbNameProd.Text.Trim() == "" && tbCalorie.Text.Trim() == "")
            {
                {
                    MessageBox.Show("Введите значения!", "Ошибка!");
                    return;
                }
            }
            RadioButton type = RbType(rbFood, rbDrink);

            productsPresenter.AddProduct(tbNameProd, tbCalorie, type);
            productsPresenter.LoadProducts();
        }