private void OnEmployeeSelectd(object sender, EmployeeInfo emp)
        {
            if (currEntryRows.Find(a => a.员工编号 == emp.员工编号) == null)
            {
                MonthlyRembursementSalaryItemEntry item = MonthlyRembursementSalaryItemEntry.AddMonthlyRembursementSalaryItemEntry(emp.员工编号, emp.姓名, year, month, isCheck);
                //如果记录已生效,清除生效标记
                if (item.已生效)
                {
                    item.生效时间 = DateTime.MinValue;
                    item.Save();

                    MonthlyRembursementSalaryItemEntry opposite = item.另一人录入的记录;
                    if (opposite != null)
                    {
                        opposite.生效时间 = DateTime.MinValue;
                        opposite.Save();
                    }
                }
                //更新上月剩余金额
                MonthlyRembursementSalaryItem lastMonthItem = item.月发放记录;
                if (lastMonthItem != null)
                {
                    item.月剩余金额 = lastMonthItem.本月剩余可报账金额;
                    //如果上个月是1月
                    if (lastMonthItem.月 == 12)
                    {
                        item.年剩余金额 = lastMonthItem.本年剩余可报账金额;
                    }
                    else
                    {
                        item.年剩余金额 = lastMonthItem.年剩余可报账金额;
                    }
                    item.Save();
                    //更新对向
                    MonthlyRembursementSalaryItemEntry opposite = item.另一人录入的记录;
                    if (opposite != null)
                    {
                        opposite.月剩余金额 = item.月剩余金额;
                        opposite.年剩余金额 = item.年剩余金额;
                        opposite.Save();
                    }
                }
                currEntryRows.Add(item);
                gridControl1.RefreshDataSource();
                bandedGridView1.FocusedRowHandle = bandedGridView1.RowCount - 1;

                MyHelper.WriteLog(LogType.信息, "新增员工每月报账工资录入记录", item.ToString <MonthlyRembursementSalaryItemEntry>());
            }
        }
        private void btn删除_Click(object sender, EventArgs e)
        {
            ColumnView colView = (ColumnView)gridControl1.MainView;

            if (colView != null)
            {
                if (MessageBox.Show("确实删除当前记录吗?", "删除提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2, 0, false) == DialogResult.Yes)
                {
                    MonthlyRembursementSalaryItemEntry currentItem = (MonthlyRembursementSalaryItemEntry)colView.GetFocusedRow();
                    currEntryRows.Remove(currentItem);
                    MyHelper.WriteLog(LogType.信息, "删除员工每月报账工资录入记录", currentItem.ToString <MonthlyRembursementSalaryItemEntry>());
                    gridControl1.RefreshDataSource();

                    MonthlyRembursementSalaryItemEntry.ClearMonthlyRembursementSalaryItemEntry(currentItem.员工编号, year, month);

                    MessageBox.Show("删除成功。", "删除提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }