Example #1
0
        /// <summary>Handles the Click event of the btnNewStudent control.</summary>
        private void btnNewStudent_Click(object sender, EventArgs e)
        {
            var m = new FrmPerson(0, false, true);

            m.ShowDialog();
            LoadStudentGrid();
        }
Example #2
0
        /// <summary>Handles the Click event of the btnEditStudent control.</summary>
        private void btnEditStudent_Click(object sender, EventArgs e)
        {
            var selectedRowIndex = grdStudents.SelectedCells[0].RowIndex;
            var selectedRow      = grdStudents.Rows[selectedRowIndex];
            var personID         = Convert.ToInt16(selectedRow.Cells["PersonID"].Value);

            var m = new FrmPerson(personID, false, false);

            m.ShowDialog();
            LoadStudentGrid();
        }