//int iCurRowIndex = dataGridView1.CurrentRow.Index;
//empRow.GongHao = dataGridView1.CurrentRow.Cells[0].EditedFormattedValue.ToString(); //这样将报空指针异常.正确写法如下:
empRow = (DS.aEmployerRow)(dtEmployer.FindByGongHao( dataGridView1.CurrentRow.Cells[0].EditedFormattedValue.ToString()) );