private void editProfileButton_Click(object sender, RoutedEventArgs e)
        {
            SQLQuery mSQLQuery = new SQLQuery();

            if (checkEnteredData())
            {
                GlobalVariables.globalParent.firstName   = firstName.Text;
                GlobalVariables.globalParent.lastName    = lastName.Text;
                GlobalVariables.globalParent.email       = email.Text;
                GlobalVariables.globalParent.address     = address.Text;
                GlobalVariables.globalParent.creditCard  = creditCard.Text;
                GlobalVariables.globalParent.phoneNumber = phoneNumber.Text;
                GlobalVariables.globalParent.id          = Convert.ToInt64(ID.Text);
                mSQLQuery.updateUsername(Convert.ToInt64(ID.Text), "Parent", username.Text, password.Password);

                mSQLQuery.updateParentData(GlobalVariables.globalParent);
                MessageBox.Show("Data Updated sucessfuly !", "Process Finshed", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
Beispiel #2
0
        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            SQLQuery mSqlQuery = new SQLQuery();

            if (checkEnteredData(true))
            {
                GlobalVariables.globalParent.firstName   = firstName.Text;
                GlobalVariables.globalParent.lastName    = lastName.Text;
                GlobalVariables.globalParent.email       = email.Text;
                GlobalVariables.globalParent.id          = Convert.ToInt64(ID.Text);
                GlobalVariables.globalParent.phoneNumber = phoneNumber.Text;
                GlobalVariables.globalParent.address     = address.Text;

                mSqlQuery.updateParentData(GlobalVariables.globalParent);
                mSqlQuery.updateUsername(GlobalVariables.globalParent.id, "Parent", username.Text, password.Password);
                MessageBox.Show("Updated", "Successfully Updated", MessageBoxButton.OK);
            }
            else
            {
                MessageBox.Show("Check your data", "Update failed", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Beispiel #3
0
        private void acceptButton_Click(object sender, RoutedEventArgs e)
        {
            //set pending to 0 ---> accepted
            SQLQuery mSQLQuery = new SQLQuery();

            if (idx == 0)
            {
                mChild.pending = 0;
                mSQLQuery.updateChildData(mChild);
            }
            else if (idx == 1)
            {
                mParent.pending = 0;
                mSQLQuery.updateParentData(mParent);
            }
            else if (idx == 2)
            {
                mStaff.pending = 0;
                mSQLQuery.updateStaffData(mStaff);
            }


            removeFromParent();
        }