Пример #1
0
        private void BackgroundImage4_Click(object sender, EventArgs e)
        {
            MySQLFunctions.SQLCommand($"UPDATE accounts set backgroundImage_path='Background4.jpg' where Email='{email}';");
            this.Hide();
            AccountPage d = new AccountPage(email);

            d.ShowDialog();
            this.Close();
        }
Пример #2
0
 private void Add_bn_Click(object sender, EventArgs e)
 {
     Bio_lbl.Text = add_bio;
     AddBio_Text.Hide();
     Add_bn.Hide();
     Cancel_bn.Hide();
     hometown_text.Hide();
     cancel_home_bn.Hide();
     add_home_bn.Hide();
     MySQLFunctions.SQLCommand($"UPDATE accounts SET Bio='{add_bio}' where Email = '{email}'");
 }
Пример #3
0
 private void profileImageFour_Click(object sender, EventArgs e)
 {
     if (isPersonalPage == false)
     {
         MySQLFunctions.SQLCommand($"UPDATE accounts set profImage_path='FemaleAvatar2.png' where Email='{email}';");
         this.Hide();
         HomePage d = new HomePage(email);
         d.ShowDialog();
         this.Close();
     }
     else
     {
         MySQLFunctions.SQLCommand($"UPDATE accounts set profImage_path='FemaleAvatar2.png' where Email='{email}';");
         this.Hide();
         AccountPage d = new AccountPage(email);
         d.ShowDialog();
         this.Close();
     }
 }
Пример #4
0
        private void save_button_Click(object sender, EventArgs e)
        {
            signup a = new signup(email_textbox.Text, firstname_textbox.Text, lastname_textbox.Text, password_textbox.Text);

            a.firstname_check();
            a.lastname_check();
            a.Email();
            a.password_check();
            if (a.firstname_check() == true)
            {
                firstname_textbox.BackColor = Color.Green;
            }
            else if (a.firstname_check() == false)
            {
                firstname_textbox.BackColor = Color.Red;
            }

            if (a.lastname_check() == true)
            {
                lastname_textbox.BackColor = Color.Green;
            }
            else if (a.lastname_check() == false)
            {
                lastname_textbox.BackColor = Color.Red;
            }

            if (a.Email() == true)
            {
                email_textbox.BackColor = Color.Green;
            }
            else if (a.Email() == false)
            {
                email_textbox.BackColor = Color.Red;
            }
            if (a.password_check() == true)
            {
                password_textbox.BackColor = Color.Green;
            }
            else
            {
                password_textbox.BackColor = Color.Red;
            }

            if (email_textbox.BackColor != Color.Red && firstname_textbox.BackColor != Color.Red &&
                lastname_textbox.BackColor != Color.Red && password_textbox.BackColor != Color.Red)
            {
                string username = email_textbox.Text;
                if (password == MySQLFunctions.getPass(username))
                {
                    MessageBox.Show("Account Already exists");
                }
                else
                {
                    string tempString = "INSERT INTO accounts (FirstName, LastName, Email, Password, profImage_path, backgroundImage_path, Bio, Home) Values('";
                    tempString = tempString + firstName + "', '";
                    tempString = tempString + lastName + "', '";
                    tempString = tempString + email + "', '";
                    tempString = tempString + password + "','nyc.jpg','10759301728_IMG_9920.jpg', 'NULL', 'NULL')";

                    MySQLFunctions.SQLCommand(tempString);

                    MessageBox.Show("You Successfully Signed Up! You May Now LogIn");
                    this.Hide();
                    WelcomePage o = new WelcomePage();
                    o.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("Make Sure Everythings Valid and Submit again");
            }
        }