private void button1_Click(object sender, EventArgs e) { using (PathToPhoto pathToPhoto = new PathToPhoto()) { if (pathToPhoto.ShowDialog() == DialogResult.OK) { connection.insertPhoto(pathToPhoto.value, bindingNavigatorPositionItem.ToString()); AdminUserDetailsForm_Load(null, null); } } }
private void photoPictureBox_Click(object sender, EventArgs e) { using (PathToPhoto pathToPhoto = new PathToPhoto()) { if (pathToPhoto.ShowDialog() == DialogResult.OK) { connection.insertPhoto(pathToPhoto.value, userIDLabel2.Text); AdminUserDetailsForm_Load(null, null); } } }