Exemplo n.º 1
0
        private void btnAddSql_Click(object sender, EventArgs e)
        {
            AddStudentFrm addStuFrm = new AddStudentFrm();

            addStuFrm.ShowDialog();

            LoadDataGridView();
        }
Exemplo n.º 2
0
        private void 修改ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string stuId = this.dgvStudent.SelectedCells[0].OwningRow.Cells["StuId"].Value.ToString();

            AddStudentFrm addStuFrm = new AddStudentFrm();

            addStuFrm.StuId = stuId;
            addStuFrm.ShowDialog();

            LoadDataGridView();
        }