private void signUpButton_Click(object sender, RoutedEventArgs e)
        {
            if (checkEnteredData())
            {
                SQLQuery mSQLQuery = new SQLQuery();
                Staff    staff     = new Staff(Convert.ToInt64(ID.Text), firstName.Text, lastName.Text, phoneNumber.Text, email.Text, -1, 1, "Staff", staffQualifications.Text);
                mSQLQuery.insertStaffData(staff, "Staff");

                mSQLQuery.insertUser(username.Text, password.Password, "Staff", staff.id);
                MessageBox.Show("Requset has been sent", "Request sent", MessageBoxButton.OK, MessageBoxImage.None);
            }
        }
Exemple #2
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);
            }
        }
Exemple #3
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);
            }
        }