Esempio n. 1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            this.Hide();
            MenuDashboard menuDashboard = new MenuDashboard(globalAdminID, "dashboard");

            menuDashboard.Show();
        }
 private void GoBack()
 {
     if (globalPrevious == "menuDashboard")
     {
         this.Hide();
         MenuDashboard menuDashboard = new MenuDashboard(globalAdminID, "dashboard");
         menuDashboard.Show();
     }
 }
Esempio n. 3
0
 private void goBackButton_Click(object sender, EventArgs e)
 {
     if (globalPrevious == "menuDashboard")
     {
         this.Hide();
         MenuDashboard menuDashboard = new MenuDashboard(globalAdminID, "dashboard");
         menuDashboard.Show();
     }
 }
Esempio n. 4
0
        private void panelYesButton_Click(object sender, EventArgs e)
        {
            try
            {
                SqlConnection connection = new SqlConnection("Data Source=luxefood.database.windows.net;Initial Catalog=LuxeFoods;User ID=Klees;Password=Johnny69;Connect Timeout=60;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False");
                SqlCommand    Command    = new SqlCommand($"DELETE FROM [gerecht] WHERE Id='{globalMenuId}'", connection);
                connection.Open();

                // Execute de SQL UPDATE Request
                Command.ExecuteNonQuery();

                // Connectie met database beindigen
                connection.Close();
                MessageBox.Show("The Order Has Been Successfully Deleted");
                panel2.Visible = false;

                gerechtNaamInput.Enabled         = !gerechtNaamInput.Enabled;
                gerechtPrijsInput.Enabled        = !gerechtPrijsInput.Enabled;
                gerechtMelkSelector.Enabled      = !gerechtMelkSelector.Enabled;
                gerechtNotenSelector.Enabled     = !gerechtNotenSelector.Enabled;
                gerechtCategorieSelector.Enabled = !gerechtCategorieSelector.Enabled;
                EditButton.Enabled   = !EditButton.Enabled;
                DeleteButton.Enabled = !DeleteButton.Enabled;
                goBackButton.Enabled = !goBackButton.Enabled;

                if (globalPrevious == "menuDashboard")
                {
                    this.Hide();
                    MenuDashboard menuDashboard = new MenuDashboard(globalAdminID, "dashboard");
                    menuDashboard.Show();
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
                OptionsHider();
            }
        }