Beispiel #1
0
        private void signUpButton_Click(object sender, RoutedEventArgs e)
        {
            if (checkEnteredData())
            {
                GlobalVariables.globalParent.creditCard = creditCard.Text;

                SQLQuery mSQLQuery = new SQLQuery();
                mSQLQuery.insertParentData(GlobalVariables.globalParent);
                mSQLQuery.insertUser(username.Text, password.Password, "Parent", GlobalVariables.globalParent.id);

                MessageBox.Show("Thank you! Your data for  request is being processed ", "Request sent", MessageBoxButton.OK, MessageBoxImage.None);
            }
            else
            {
                MessageBox.Show("check your data", "faild to register", MessageBoxButton.OK, MessageBoxImage.None);
            }
        }
Beispiel #2
0
        private void signUpButton_Click(object sender, RoutedEventArgs e)
        {
            if (checkEnteredData(false))
            {
                GlobalVariables.globalParent = new Parent(Convert.ToInt64(ID.Text), firstName.Text, lastName.Text, phoneNumber.Text, email.Text
                                                          , address.Text, creditCard.Text, 1);

                SQLQuery mSQLQuery = new SQLQuery();
                mSQLQuery.insertParentData(GlobalVariables.globalParent);
                mSQLQuery.insertUser(username.Text, password.Password, "Parent", GlobalVariables.globalParent.id);
                signedUp = true;
                MessageBox.Show("Thank you! Your data for  request is being processed ", "Request sent", MessageBoxButton.OK, MessageBoxImage.None);
            }
            else
            {
                MessageBox.Show("check your data", "faild to register", MessageBoxButton.OK, MessageBoxImage.None);
            }
        }