protected override void OnDeleted() { EffectivePerformanceSalaryInputGroup inputGroup = GetEffectivePerformanceSalaryInputGroup(this.编号); EffectivePerformanceSalaryInput anotherInput = this.是验证录入 ? inputGroup.A : inputGroup.B; //删除对向记录 if (anotherInput != null) { anotherInput.Delete(); } base.OnDeleted(); }
void GetModifiyFields() { contentDifferentFields = new List <ModifyField>(); EffectivePerformanceSalaryInputGroup inputGroup = GetEffectivePerformanceSalaryInputGroup(this.编号); if (inputGroup.A != null && inputGroup.B != null) { inputGroup.A.Reload(); inputGroup.B.Reload(); contentDifferentFields = MyHelper.GetModifyFields(inputGroup.A, inputGroup.B); } }
public static EffectivePerformanceSalaryInputGroup GetEffectivePerformanceSalaryInputGroup(string number) { EffectivePerformanceSalaryInputGroup inputGroup = new EffectivePerformanceSalaryInputGroup(); GroupOperator criteria = new GroupOperator(GroupOperatorType.And, new BinaryOperator("编号", number, BinaryOperatorType.Equal)); XPCollection objset = new XPCollection(MyHelper.XpoSession, typeof(EffectivePerformanceSalaryInput), criteria, new SortProperty("录入时间", SortingDirection.Descending)); foreach (EffectivePerformanceSalaryInput di in objset) { if (di.是验证录入) { inputGroup.B = di; } else { inputGroup.A = di; } } return(inputGroup); }