Пример #1
0
        private void Button_Cancer_Click(object sender, EventArgs e)
        {
            this.Close();
            addFood af = new addFood();

            af.Show();
        }
Пример #2
0
        private void Button_Add_Click(object sender, EventArgs e)
        {
            Food         food = new Food();
            MemoryStream pic  = new MemoryStream();



            try
            {
                string name = tb_name.Text;
                pictureBox_food.Image.Save(pic, pictureBox_food.Image.RawFormat);
                food.insertTFoot(name, pic);


                if (food.insertTFoot(name, pic))
                {
                    MessageBox.Show("Add new student success", "Add Student", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Error To Add Student", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                };
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }



            //tf.name().Text = "drink";
            //tf.Top = 10;
            //tf.Left = 10;
            addFood af = new addFood();

            af.Show();
            this.Close();
        }
Пример #3
0
        private void guna2GradientTileButton7_Click(object sender, EventArgs e)
        {
            addFood aFood = new addFood();

            aFood.Show();
        }