private void brnProfile_Click(object sender, EventArgs e) { // Go to profile Hide(); frmProfile profile = new frmProfile(UserManager.user); profile.ShowDialog(); }
private void btnCancel_Click(object sender, EventArgs e) { // Go to the profile page Hide(); frmProfile profile = new frmProfile(user, popout); profile.ShowDialog(); }
private void btnProfile_Click(object sender, EventArgs e) { // Open a profile window of the selected user User selectedUser = (User)dgvList.CurrentRow.DataBoundItem; Hide(); frmProfile profile = new frmProfile(selectedUser, true); profile.ShowDialog(); }
private void btnSave_Click(object sender, EventArgs e) { // Checks if all the user data is valid if (user.ValidateAndAssign( txtUsername.Text, txtBio.Text, txtFirstname.Text, txtLastname.Text, txtEmail.Text, (int)nudAge.Value, cbxGender.SelectedIndex )) { // Save the users and go back to the profile UserManager.WriteUsers(); Hide(); frmProfile profile = new frmProfile(user, popout); profile.ShowDialog(); } }