Exemple #1
0
        public void btnAdd_Click(object sender, EventArgs e)
        {
            TeacherAddUpdate TeacherAddUpdateForm = new TeacherAddUpdate();

            TeacherAddUpdateForm.Command         = "Add Teacher";
            TeacherAddUpdateForm.TeacherListForm = this;

            ////@kuroNeko
            //dgvCell = dataGridView1.CurrentCell;

            //dataGridView1.ClearSelection();
            TeacherAddUpdateForm.ShowDialog();
        }
Exemple #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            TeacherAddUpdate TeacherAddUpdateForm = new TeacherAddUpdate();

            TeacherAddUpdateForm.Command         = "Update Teacher";
            TeacherAddUpdateForm.TeacherListForm = this;
            //TeacherAddUpdateForm.dataRow = dataGridView1.Rows[dataGridView1.CurrentRow.Index];
            TeacherAddUpdateForm.TeacherID   = dataGridView1.SelectedRows[0].Cells["TeacherID"].Value.ToString();
            TeacherAddUpdateForm.SubjectID   = dataGridView1.SelectedRows[0].Cells["SubjectID"].Value.ToString(); //@kuroNeko Access data of hidden column
            TeacherAddUpdateForm.SubjectName = dataGridView1.SelectedRows[0].Cells["SubjectName"].Value.ToString();

            ////@kuroNeko
            //dgvCell = dataGridView1.CurrentCell;

            //dataGridView1.ClearSelection();
            TeacherAddUpdateForm.ShowDialog();
        }