private void ExitButton_Click(object sender, EventArgs e)
        {
            AdminUI adminUI = new AdminUI();

            this.Close();
            adminUI.Show();
        }
        private void Cancelbutton_Click(object sender, EventArgs e)
        {
            AdminUI adminUI = new AdminUI(Online_User);

            this.Close();
            adminUI.Show();
        }
        private void RemoveButton_Click(object sender, EventArgs e)
        {
            if (!UserIDTextBox.Text.Trim().Equals(string.Empty))
            {
                int id = Convert.ToInt32(UserIDTextBox.Text);
                databaseManager.RemoveUser(id);
                this.Close();

                AdminUI adminUI = new AdminUI();
                adminUI.Show();
            }
            else
            {
                MessageBox.Show("Please fill all the field!");
            }
        }
        private void SaveButton_Click(object sender, EventArgs e)
        {
            if (!UsernameTextBox.Text.Trim().Equals(string.Empty) && !PasswordTextBox.Text.Trim().Equals(string.Empty) && !AttributComboBox.Text.Trim().Equals(string.Empty))
            {
                string username = UsernameTextBox.Text;
                string password = PasswordTextBox.Text;
                string attribut = AttributComboBox.Text;
                databaseManager.AddUser(username, password, attribut);
                UsernameTextBox.Clear();
                PasswordTextBox.Clear();

                AdminUI adminUI = new AdminUI();
                this.Close();
                adminUI.Show();
            }
            else
            {
                MessageBox.Show("Please fill all the fields!");
            }
        }
        private void SaveButton_Click(object sender, EventArgs e)
        {
            if (!UsernameTextBox.Text.Trim().Equals(string.Empty) && !OldPasswordTextBox.Text.Trim().Equals(string.Empty) && !NewPasswordTextBox.Text.Trim().Equals(string.Empty) && !RepeatPasswordTextBox.Text.Trim().Equals(string.Empty))
            {
                userData = XmlDataManager.XmlUserDataReader("userdata.xml");
                string unchangeUsername = userData.Username; // old Username
                string UserAttribut     = userData.UserAttribut;

                userData1 = XmlDataManager.XmlUserDataReader("XMLSystemAdmin.xml");
                string UserAttribut1 = userData1.UserAttribut;

                if (!(UserAttribut.Equals("SuperAdmin")))
                {
                    // return the UserId from the database
                    int UserId = databaseManager.ReturnUserID(unchangeUsername, OldPasswordTextBox.Text);

                    string newUsername    = UsernameTextBox.Text;       // new Username
                    string oldPassword    = OldPasswordTextBox.Text;    // old Password
                    string newPassword    = NewPasswordTextBox.Text;    // new Password
                    string repeatPassword = RepeatPasswordTextBox.Text; // new Password

                    //Edit the UserData as simple user.
                    databaseManager.EditAccountUser(UserId, newUsername, oldPassword, newPassword, repeatPassword);
                    UsernameTextBox.Clear();
                    OldPasswordTextBox.Clear();
                    NewPasswordTextBox.Clear();
                    RepeatPasswordTextBox.Clear();

                    AdminUI adminUI = new AdminUI(Online_User);
                    this.Close();
                    adminUI.Show();
                }
                else
                {
                    string AdminPassword = userData1.Password;
                    if ((OldPasswordTextBox.Text).Equals(AdminPassword))
                    {
                        if (File.Exists("XMLSystemAdmin.xml"))
                        {
                            userData.Username     = UsernameTextBox.Text.Trim();
                            userData.Password     = NewPasswordTextBox.Text.Trim();
                            userData.UserAttribut = UserAttribut;
                            XmlDataManager.XmlDataWriter(userData, "XMLSystemAdmin.xml");
                            MessageBox.Show("SuperAdmin Data changed successful");

                            AdminUI adminUI = new AdminUI(Online_User);
                            this.Close();
                            adminUI.Show();
                        }
                        else
                        {
                            MessageBox.Show("XMLSystemAdmin.xml File not found!");
                        }
                    }
                    else
                    {
                        MessageBox.Show("Wrong Password. Please give a correct password!");
                    }
                }
            }
            else
            {
                MessageBox.Show("Fill all Fields");
            }
        }