Пример #1
0
 //修改学生
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (myDataGridView1.DataSource == null)
     {
         return;
     }
     if (myDataGridView1.SelectedRows.Count >= 1)
     {
         AddStudentInfoForm frm = new AddStudentInfoForm(FormStatus.Update, this.myDataGridView1.CurrentRow.Cells["StuNo"].Value.ToString());
         frm.Show();
     }
 }
Пример #2
0
        //新增学生
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddStudentInfoForm frm = new AddStudentInfoForm(FormStatus.Add, null);

            frm.Show();
        }