Example #1
0
 private void llinkViewAccDetails_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     frmStudentDetails = new frmStudentDetails(Int32.Parse(txtbAccNum.Text), false);
     frmStudentDetails.ShowDialog();
 }
Example #2
0
        private void dGridStudentResults_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dGridStudentResults.SelectedCells.Count > 0)
            {
                //Get selected ID
                string id = dGridStudentResults.SelectedCells[0].Value.ToString();

                switch (searchType)
                {
                    //Launch form with Student Details
                    case "normalSearch":

                        if (frmStudentDetails == null || frmStudentDetails.Visible == false)
                        {
                            frmStudentDetails = new frmStudentDetails(Int32.Parse(id), true);
                            frmStudentDetails.ShowDialog();
                            if (frmStudentDetails.editedInfo)
                            {
                                //If information was edited, do another search
                                btnSearch.PerformClick();
                            }
                            frmStudentDetails.Dispose();
                        }
                        break;

                    //Returns account information to frmNewPayment
                    case "paymentSearch":
                        studentID = id;
                        this.Close();
                        break;
                }
            }
        }