예제 #1
0
        private void btnSignUp_Click(object sender, EventArgs e)
        {
            frmStudent newStudent = new frmStudent();

            newStudent.Show();
            this.Hide();
        }
예제 #2
0
        private void lblEditStudent_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            String edit = "Edit";


            DialogResult dialogResult = MessageBox.Show("Would you like to edit the student information for the student " + dgvStudent.CurrentRow.Cells[1].Value.ToString() + "?", "Edit Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            //if they choose yes, refresh the form
            if (dialogResult == DialogResult.Yes)
            {
                Student editStudent = new Student(Int32.Parse(dgvStudent.CurrentRow.Cells[0].Value.ToString()), dgvStudent.CurrentRow.Cells[1].Value.ToString(), dgvStudent.CurrentRow.Cells[2].Value.ToString(),
                                                  dgvStudent.CurrentRow.Cells[3].Value.ToString(), dgvStudent.CurrentRow.Cells[4].Value.ToString(), dgvStudent.CurrentRow.Cells[5].Value.ToString());

                this.Hide();
                frmStudent frmStudent = new frmStudent(edit, editStudent);
                frmStudent.Show();
            }

            //MessageBox.Show(dgvStudent.CurrentRow.Cells[0].Value.ToString());
        }