//更新到正式表
        public void UpdateToFormalTable()
        {
            if (另一人录入的记录 == null || this.内容不同的字段.Count > 0)
            {
                return;
            }

            MonthlyRembursementSalaryItem m = MonthlyRembursementSalaryItem.AddMonthlyRembursementSalaryItem(this.员工编号, this.年, this.月);

            this.CopyWatchMember(m);

            m.创建人  = this.录入人;
            m.创建时间 = DateTime.Now;
            m.Save();

            //更新生效标记
            if (!this.已生效)
            {
                this.生效时间 = DateTime.Now;
                this.Save();

                MonthlyRembursementSalaryItemEntry opposite = 另一人录入的记录;
                opposite.生效时间 = DateTime.Now;
                opposite.Save();
            }
        }
コード例 #2
0
        public static MonthlyRembursementSalaryItem AddMonthlyRembursementSalaryItem(string emplid, int year, int month)
        {
            MonthlyRembursementSalaryItem item = GetMonthlyRembursementSalaryItem(emplid, year, month);

            if (item == null)
            {
                item      = new MonthlyRembursementSalaryItem();
                item.标识   = Guid.NewGuid();
                item.员工编号 = emplid;
                item.年    = year;
                item.月    = month;
                item.创建人  = AccessController.CurrentUser.姓名;
                item.创建时间 = DateTime.Now;
                item.Save();
            }
            return(item);
        }