Example #1
0
        //更新到正式表
        public void UpdateToFormalTable()
        {
            if (this.内容不同的字段.Count > 0)
            {
                return;
            }

            ManagementTraineeInfo m = ManagementTraineeInfo.GetManagementTraineeInfo(this.员工编号);

            if (m == null)
            {
                m    = new ManagementTraineeInfo();
                m.标识 = Guid.NewGuid();
            }
            this.CopyWatchMember(m);
            m.更新时间 = DateTime.Now;
            m.Save();

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

                ManagementTraineeInfoInput opposite = 另一人录入的记录;
                opposite.生效时间 = DateTime.Now;
                opposite.Save();
            }
        }
Example #2
0
        public static ManagementTraineeInfoInput AddManagementTraineeInfoInput(string emplid, bool isVerify, bool copyEffective)
        {
            ManagementTraineeInfoInput item = GetManagementTraineeInfoInput(emplid, isVerify);

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

                if (copyEffective)
                {
                    //将当前的管培生信息带进来
                    ManagementTraineeInfo effectiveManagementTraineeInfo = ManagementTraineeInfo.GetManagementTraineeInfo(emplid);
                    if (effectiveManagementTraineeInfo != null)
                    {
                        item.CopyEffective = copyEffective;
                        effectiveManagementTraineeInfo.CopyWatchMember(item);
                    }
                }

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

                item.Save();
            }
            return(item);
        }