Example #1
0
        public void btnAdd_Click(object sender, EventArgs e)
        {
            StudentAddUpdate StudentAddUpdateForm = new StudentAddUpdate();

            StudentAddUpdateForm.Command         = "Add New Student";
            StudentAddUpdateForm.StudentListForm = this;
            dataGridView1.ClearSelection();
            StudentAddUpdateForm.ShowDialog();
        }
Example #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            StudentAddUpdate StudentAddUpdateForm = new StudentAddUpdate();

            StudentAddUpdateForm.Command         = "Update Student";
            StudentAddUpdateForm.StudentListForm = this;
            StudentAddUpdateForm.StudentID       = dataGridView1.SelectedRows[0].Cells["StudentID"].Value.ToString();
            dataGridView1.ClearSelection();
            StudentAddUpdateForm.ShowDialog();
        }