private void biRegister_Click(object sender, EventArgs e) { FrmStaffInfo staffInfo = new FrmStaffInfo(true); staffInfo.ShowDialog(this); if (staffInfo.HasChanged) { DoSearch(null, null, null); } }
private void dgvStaffs_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && e.ColumnIndex >= 0) { DataGridViewRow row = dgvStaffs.Rows[e.RowIndex]; Maticsoft.Model.SMT_STAFF_FACEDEV ffd = (Maticsoft.Model.SMT_STAFF_FACEDEV)row.Tag; List <Maticsoft.Model.SMT_STAFF_FACEDEV> list = new List <Maticsoft.Model.SMT_STAFF_FACEDEV>() { ffd }; if (dgvStaffs.Columns[e.ColumnIndex].Name == "Col_DELETE") { doDelete(list, false, row); } else if (dgvStaffs.Columns[e.ColumnIndex].Name == "Col_Modify") { try { FrmStaffInfo staffInfo = new FrmStaffInfo(ffd); staffInfo.ShowDialog(this); row.Cells[1].Value = staffInfo.StaffInfo.STAFF_NO; row.Cells[2].Value = staffInfo.StaffInfo.REAL_NAME; row.Cells[3].Value = staffInfo.StaffInfo.ORG_NAME; string state = ""; if (staffInfo.StaffInfo.PHOTO == null || staffInfo.StaffInfo.PHOTO.Length == 0) { state = "未上传(无照片)"; } else { state = "未上传"; } row.Cells[4].Value = state; } catch (Exception ex) { WinInfoHelper.ShowInfoWindow(this, "修改发生异常:" + ex.Message); } } else if (dgvStaffs.Columns[e.ColumnIndex].Name == "Col_SC") { DoUpload(list, true, false, row); } } }