private void createProfileButton_Click(object sender, EventArgs e) { if (!IsValidated()) { return; } //add new user and set properties var newUser = new User { Username = newUsernameTextBox.Text, FirstName = firstNameTextBox.Text, LastName = lastNameTextBox.Text, EmailAddress = emailTextBox.Text, Location = locationTextBox.Text }; _context.Users.Add(newUser); _context.SaveChanges(); this.Hide(); Form newActivitiesListForm = new ActivitiesListForm(newUser); newActivitiesListForm.Show(); }
private void signInButton_Click(object sender, EventArgs e) { _user = (User)availableUserDropDown.SelectedValue; Form newActivitiesListForm = new ActivitiesListForm(_user); newActivitiesListForm.Show(); this.Hide(); }