protected virtual void EPRuleEmployeeCondition_FieldName_FieldVerifying(PXCache sender, PXFieldVerifyingEventArgs e) { EPRuleEmployeeCondition row = e.Row as EPRuleEmployeeCondition; if (row == null) { return; } Type cachetype = GraphHelper.GetType(row.Entity); if (cachetype == null) { return; } PXCache cache = this.Caches[cachetype]; PXDBAttributeAttribute.Activate(cache); PXFieldState state = cache.GetStateExt(null, e.NewValue.ToString()) as PXFieldState; if (state == null) { throw new PXException(Messages.FieldCannotBeFound); } }
protected virtual void EPRuleEmployeeCondition_Value2_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { EPRuleEmployeeCondition row = e.Row as EPRuleEmployeeCondition; if (row == null) { return; } if (row.IsField == true) { e.ReturnState = CreateFieldStateForFieldName(e.ReturnState, AssigmentMap.Current.EntityType, null, AssigmentMap.Current.EntityType); return; } if (row != null && !string.IsNullOrEmpty(row.FieldName) && row.Condition != null && (PXCondition)row.Condition != PXCondition.ISNULL && (PXCondition)row.Condition != PXCondition.ISNOTNULL && (PXCondition)row.Condition != PXCondition.NOTLIKE && (PXCondition)row.Condition != PXCondition.LIKE && (PXCondition)row.Condition != PXCondition.LLIKE && (PXCondition)row.Condition != PXCondition.RLIKE) { var fieldState = CreateFieldStateForFieldValue(e.ReturnState, row.Entity, row.Entity, row.FieldName); if (fieldState != null) { fieldState.Value = null; e.ReturnState = fieldState; } } }
protected virtual void EPRuleEmployeeCondition_FieldName_FieldSelecting(PXCache sender, PXFieldSelectingEventArgs e) { EPRuleEmployeeCondition row = e.Row as EPRuleEmployeeCondition; if (row != null) { e.ReturnState = CreateFieldStateForFieldName(e.ReturnState, row.Entity, null, row.Entity); } }