Пример #1
0
        private void editAccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Student selStudent = GetSelectedStudent();

            if (selStudent != null)
            {
                using (EditAccount ea = new EditAccount(selStudent))
                {
                    ea.OnStudentUpdated += UpdateStudent;
                    ea.ShowDialog();
                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("No Active Selection made. Please select the whole row.");
            }
        }
Пример #2
0
        }//end of new account

        //edit account tool strip menu
        private void editAccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Student selStudent = GetSelectedStudent();
            Account selAccount = GetSelectedAccount();

            if (selStudent != null)
            {
                // passing the selected student and account into the edit form
                using (EditAccount ea = new EditAccount(selStudent, selAccount))
                {
                    ea.ShowDialog();
                    this.Close();
                }
            }
            else
            {
                MessageBox.Show("No Active Selection made. Please select the whole row.");
            }
        }//end of edit account