protected override void OnDeleting() { base.OnDeleting(); MONTHLY_SALARY_CACHE.Remove(CacheKey); //复制到历史表 MonthlySalaryHistory m = MonthlySalaryHistory.AddMonthlySalaryHistory(this.员工编号, this.期号); this.CopyWatchMember(m); m.Save(); }
public static MonthlySalaryHistory AddMonthlySalaryHistory(string emplid, int period) { MonthlySalaryHistory item = GetMonthlySalaryHistory(emplid, period); if (item == null) { item = new MonthlySalaryHistory(); item.标识 = Guid.NewGuid(); item.员工编号 = emplid; item.期号 = period; item.Save(); } return(item); }
public static MonthlySalaryHistory GetMonthlySalaryHistory(Guid id) { MonthlySalaryHistory obj = (MonthlySalaryHistory)Session.DefaultSession.GetObjectByKey(typeof(MonthlySalaryHistory), id); return(obj); }