public static MonthlySalaryInput AddMonthlySalaryInput(string emplid, int period, bool isVerify, bool copyEffective)
        {
            MonthlySalaryInput item = GetMonthlySalaryInput(emplid, period, isVerify);

            if (item == null)
            {
                item = new MonthlySalaryInput();

                if (copyEffective)
                {
                    //将当前执行的标准带过来
                    MonthlySalary effectiveMonthlySalary = MonthlySalary.GetEffective(emplid, DateTime.Today);
                    if (effectiveMonthlySalary != null)
                    {
                        item.CopyEffective = copyEffective;
                        effectiveMonthlySalary.CopyWatchMember(item);
                    }
                }

                item.标识    = Guid.NewGuid();
                item.员工编号  = emplid;
                item.期号    = period;
                item.是验证录入 = isVerify;
                item.薪酬体系  = "";
                item.录入人   = "   ";
                item.录入时间  = DateTime.Now;

                item.Save();
            }
            return(item);
        }
        //更新到正式表
        public void UpdateToFormalTable()
        {
            MonthlySalary m = MonthlySalary.GetMonthlySalary(this.员工编号, this.开始执行日期);

            if (m == null)
            {
                m    = new MonthlySalary();
                m.标识 = Guid.NewGuid();
            }
            this.CopyWatchMember(m);
            m.序号   = this.序号;
            m.备注   = m.调整类型;
            m.截止日期 = DateTime.MinValue;
            m.Save();

            //历史记录失效
            List <MonthlySalary> list = MonthlySalary.GetMonthlySalarys(this.员工编号);
            MonthlySalary        prev = null;

            foreach (MonthlySalary item in list)
            {
                if (item.标识 == m.标识 || item.截止日期 != DateTime.MinValue || prev == null)
                {
                    prev = item;
                    continue;
                }
                item.截止日期 = prev.开始执行日期.AddDays(-1);
                item.Save();
                prev = item;
            }

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

                MonthlySalaryInput opposite = 另一人录入的记录;
                opposite.生效时间 = DateTime.Now;
                opposite.Save();
            }
        }