public override int GetHashCode() { unchecked { var hashCode = AllowBlank.GetHashCode(); hashCode = (hashCode * 397) ^ (Error != null ? Error.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ErrorTitle != null ? ErrorTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ErrorStyleValue.GetHashCode(); hashCode = (hashCode * 397) ^ OperatorValue.GetHashCode(); hashCode = (hashCode * 397) ^ (Prompt != null ? Prompt.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (PromptTitle != null ? PromptTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ShowDropDown.GetHashCode(); hashCode = (hashCode * 397) ^ ShowErrorMessage.GetHashCode(); hashCode = (hashCode * 397) ^ ShowInputMessage.GetHashCode(); hashCode = (hashCode * 397) ^ ValidationTypeValue.GetHashCode(); hashCode = (hashCode * 397) ^ (Formula1 != null ? Formula1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Formula2 != null ? Formula2.GetHashCode() : 0); return(hashCode); } }
protected virtual string GetSqlQueryOperatorRepresentation(OperatorValue operationTag) { switch (operationTag) { case OperatorValue.Equals: return(" = "); case OperatorValue.GreaterThanEquals: return(" >= "); case OperatorValue.LessThanEquals: return(" <= "); case OperatorValue.NotEquals: return(" <> "); case OperatorValue.Begins: case OperatorValue.Contains: return(" LIKE "); default: throw new FormatException(string.Format(Resources.ErrorMessages_OperationTagNotSupported, operationTag.ToString())); } }
protected virtual string GetSqlQueryOperatorRepresentation(OperatorValue operationTag) { switch (operationTag) { case OperatorValue.Equals: return " = "; case OperatorValue.GreaterThanEquals: return " >= "; case OperatorValue.LessThanEquals: return " <= "; case OperatorValue.NotEquals: return " <> "; case OperatorValue.Begins: case OperatorValue.Contains: return " LIKE "; default: throw new FormatException(string.Format(Resources.ErrorMessages_OperationTagNotSupported, operationTag.ToString())); } }
protected virtual string GetSqlQueryFieldValueRepresentation(string fieldValue, OperatorValue operationTag) { if (operationTag == OperatorValue.Begins) return fieldValue + "%"; if (operationTag == OperatorValue.Contains) return "%" + fieldValue + "%"; return fieldValue; }
protected virtual string GetSqlQueryFieldValueRepresentation(string fieldValue, OperatorValue operationTag) { if (operationTag == OperatorValue.Begins) { return(fieldValue + "%"); } if (operationTag == OperatorValue.Contains) { return("%" + fieldValue + "%"); } return(fieldValue); }