Ejemplo n.º 1
0
        private void added_btn_Click(object sender, EventArgs e)
        {
            DoConnection();
            cmd             = new SqlCommand();
            cmd.Connection  = con;
            cmd.CommandText = "insert into tbl_Pizza values(" + id_txtbox.Text + ",'" + name_txtbox.Text + "','" + Filename + "','" + desc_txtbox.Text + "'," + price_txtbox.Text.ToString() + ");";

            int x = cmd.ExecuteNonQuery();

            if (x == 1)
            {
                MessageBox.Show("New Pizza added to menu!!");
            }
            else
            {
                MessageBox.Show("no records to insert");
            }


            Admin_form af = new Admin_form();

            af.Show();

            String Name  = name_txtbox.Text;
            float  Price = float.Parse(price_txtbox.Text);

            this.Hide();
            obj.Show();
            this.Hide();
            con.Close();
        }
Ejemplo n.º 2
0
        private void back_button_Click(object sender, EventArgs e)
        {
            Admin_form af = new Admin_form();

            af.Show();
            this.Hide();
        }
Ejemplo n.º 3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            this.progressBar1.Increment(1);

            if (progressBar1.Value == 100)
            {
                this.Close();
                MessageBox.Show("Admin Succefully logged in!");
                Admin_form af = new Admin_form();
                af.Show();
            }
        }