private void btn_Dutyadd_Click(object sender, EventArgs e) { Form_AttendanceRecordAdd form = new Form_AttendanceRecordAdd("添加"); form.Show(); if (form.DialogResult == DialogResult.OK) { RefreshDataGridView(); } }
private void btn_DutyDelete_Click(object sender, EventArgs e) { Form_AttendanceRecordAdd onduty = new Form_AttendanceRecordAdd("删除"); if (_infoList.Count > 0) { onduty.infoList = _infoList; onduty.Show(); if (onduty.DialogResult == DialogResult.OK) { RefreshDataGridView(); } } else { MessageBox.Show("请在表单中选择需要删除的数据!"); } }