private void editProfileButton_Click(object sender, RoutedEventArgs e) { SQLQuery mSql = new SQLQuery(); if (checkEnteredData()) { GlobalVariables.globalAdmin.id = Convert.ToInt64(ID.Text); GlobalVariables.globalAdmin.firstName = firstName.Text; GlobalVariables.globalAdmin.lastName = lastName.Text; mSql.updateUsername(Convert.ToInt64(ID.Text), "Admin", username.Text, password.Password); GlobalVariables.globalAdmin.email = email.Text; GlobalVariables.globalAdmin.phoneNumber = phoneNumber.Text; mSql.updateAdminData(GlobalVariables.globalAdmin); MessageBox.Show("Data Updated sucessfuly !", "Process Finshed", MessageBoxButton.OK, MessageBoxImage.Information); } }