/// <summary> /// 删除一条奖罚记录 /// hzy /// </summary> private void DeleteOneRP() { RP rp = (RP)UserGrid.SelectedItem; RPBLL rpBll = new RPBLL(); if (!rpBll.DeleteRPByNo(rp.No)) { MessageBox.Show("删除奖罚记录失败", "人事工资管理系统"); } m_rps = rpBll.GetAllRP(); ManagerBindingRP(rpBll.GetAllRP(), maxnum, 1); }
/// <summary> /// 批量删除奖罚记录 /// hzy /// </summary> private void DeleteSelectedRPs() { if (selectedID.Count != 0) { if (MessageBox.Show("是否删除所选中的奖罚记录?", "Tips", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { foreach (int i in selectedID) { rpBll.DeleteRPByNo(i); } } selectedID.Clear(); m_rps = rpBll.GetAllRP(); ManagerBindingRP(rpBll.GetAllRP(), maxnum, 1); } else { MessageBox.Show("请选择要删除的奖罚记录"); } }