コード例 #1
0
ファイル: Form3.cs プロジェクト: alberthattingh/Adrestia
        private void BtnEditProfile_Click(object sender, EventArgs e)
        {
            EditStudent edit = new EditStudent
            {
                studentID = this.UserID
            };

            edit.ShowDialog();
        }
コード例 #2
0
 private void BtnEditStudent_Click(object sender, EventArgs e)
 {
     try
     {
         if (selectedStudent != 0)
         {
             EditStudent editStudentForm = new EditStudent
             {
                 studentID = selectedStudent.ToString()
             };
             editStudentForm.ShowDialog();
             PopulateGridView();
             connection.Close();
         }
         else
         {
             MessageBox.Show("Please select a student");
         }
     }
     catch (Exception error)
     {
         MessageBox.Show("Error: " + error.Message);
     }
 }