protected void LoadData()
 {
     showDifferent = false;
     //清除原来的数据
     currEntryRows           = MonthlyWageLoanItemEntry.GetEditingRows(year, month, isCheck);
     currEntryRows           = currEntryRows.OrderBy(a => a.录入时间).ThenBy(a => a.员工编号).ToList();
     gridControl1.DataSource = currEntryRows;
     gridControl1.RefreshDataSource();
     gridControl1.Refresh();
 }
        private void Submit()
        {
            bool isSameEditor = false;
            List <MonthlyWageLoanItemEntry> ssList          = MonthlyWageLoanItemEntry.GetEditingRows(year, month, false);
            List <MonthlyWageLoanItemEntry> ssList_opposite = MonthlyWageLoanItemEntry.GetEditingRows(year, month, true);

            //检查是否录入完成
            foreach (MonthlyWageLoanItemEntry mrs in ssList)
            {
                if (mrs.实际借款金额 == 0)
                {
                    MessageBox.Show("请全部录入完成以后再提交");
                    return;
                }
            }
            //检查是否同一人录入
            foreach (MonthlyWageLoanItemEntry mrs in ssList)
            {
                if (mrs.另一人录入的记录 != null)
                {
                    mrs.CompareInputContent();
                    string editor          = mrs.录入人;
                    string editor_opposite = mrs.另一人录入的记录.录入人.Trim();
                    if (editor == editor_opposite && editor_opposite != "")
                    {
                        isSameEditor = true;
                        break;
                    }
                }
            }

            gridControl1.Refresh();

            if (isSameEditor)
            {
                MessageBox.Show("两次录入不能是同一个人");
                return;
            }

            //检查差异
            bool all_same = true;

            if (ssList.Count != ssList_opposite.Count)
            {
                all_same = false;
            }
            else
            {
                foreach (MonthlyWageLoanItemEntry wle in ssList)
                {
                    if (!wle.另一人已录入 || wle.内容不同的字段.Count > 0)
                    {
                        all_same = false;
                        break;
                    }
                }
            }
            if (all_same)
            {
                //转成正式
                foreach (MonthlyWageLoanItemEntry wle in ssList)
                {
                    wle.UpdateToFormalTable();
                }

                MessageBox.Show("双人录入成功");

                this.DialogResult = DialogResult.OK;
                LoadData();
                Close();
            }
            else
            {
                MessageBox.Show("双人录入失败:双人录入不一致或者另外一个人还没有录入");
            }
        }