Example #1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     //确定是否绑定了数据源
     if (myDataGridView1.DataSource == null)
     {
         return;
     }
     if (myDataGridView1.SelectedRows.Count > 0)
     {
         int id = int.Parse(this.myDataGridView1.CurrentRow.Cells[0].Value.ToString());
         AddSpecialtyForm frm = new AddSpecialtyForm(FormStatus.Update, id);
         frm.Show();
     }
 }
Example #2
0
        //新增专业
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddSpecialtyForm frm = new AddSpecialtyForm(FormStatus.Add, null);

            frm.Show();
        }