public void AddBetweenCondition( QueryConditionRelationType conditionRelationType, string fieldName, DbType parameterDbType, string parameterName, QueryConditionOperatorType leftConditionOperatorType, QueryConditionOperatorType rightConditionOperatorType, object leftParameterValue, object rightParameterValue, ParameterValueValidateCheckDelegate parameterValueValidateCheckHandler) { BeginGroupCondition(conditionRelationType); AddCondition(QueryConditionRelationType.AND, fieldName, parameterDbType, parameterName + "_Left", leftConditionOperatorType, leftParameterValue, parameterValueValidateCheckHandler); AddCondition(QueryConditionRelationType.AND, fieldName, parameterDbType, parameterName + "_Right", rightConditionOperatorType, rightParameterValue, parameterValueValidateCheckHandler); EndGroupCondition(); }
public void AddCondition( QueryConditionRelationType conditionRelationType, string fieldName, DbType parameterDbType, string parameterName, QueryConditionOperatorType conditionOperatorType, object parameterValue, ParameterValueValidateCheckDelegate parameterValueValidateCheckHandler) { if (parameterValueValidateCheckHandler == null) { parameterValueValidateCheckHandler = DefaultParameterValueValidationCheck; } if (parameterValueValidateCheckHandler(parameterValue)) { m_conditions.Add(new SqlCondition { ConditionRelationType = conditionRelationType, ParameterDbType = parameterDbType, FieldName = fieldName, ParameterName = parameterName, OperatorType = conditionOperatorType, ParameterValue = parameterValue }); } }