//更新到正式表 public void UpdateToFormalTable() { if (this.内容不同的字段.Count > 0) { return; } ManagementTraineeAbility m = ManagementTraineeAbility.GetManagementTraineeAbility(员工编号, 年度); if (m == null) { m = new ManagementTraineeAbility(); m.标识 = Guid.NewGuid(); m.创建时间 = DateTime.Now; } this.CopyWatchMember(m); m.序号 = this.序号; m.更新时间 = DateTime.Now; m.Save(); //更新生效标记 if (!this.已生效) { this.生效时间 = DateTime.Now; this.Save(); ManagementTraineeAbilityInput opposite = 另一人录入的记录; opposite.生效时间 = DateTime.Now; opposite.Save(); } }
public static ManagementTraineeAbilityInput AddManagementTraineeAbilityInput(string division, string grade, string emplid, string name, int year, int order, bool isVerify) { ManagementTraineeAbilityInput item = GetManagementTraineeAbilityInput(emplid, year, isVerify); if (item == null) { item = new ManagementTraineeAbilityInput(); item.标识 = Guid.NewGuid(); item.届别 = division; item.岗位级别 = grade; item.员工编号 = emplid; item.姓名 = name; item.年度 = year; item.序号 = order; item.是验证录入 = isVerify; item.录入人 = " "; item.录入时间 = DateTime.Now; item.Save(); } return(item); }