/// <summary> /// Obtiene el valor de la palabra clave /// </summary> /// <param name="handler">Orquestador</param> /// <returns>Valor</returns> public string GetValue(object handler) { if (False == null) { False = string.Empty; } switch (Type) { #region Texto case ValidationType.Equal: if (Value1 == Value2) { return(True); } else { return(False); } case ValidationType.Different: if (Value1 != Value2) { return(True); } else { return(False); } #endregion #region Numericos case ValidationType.Greater: case ValidationType.Less: case ValidationType.GreaterEqual: case ValidationType.LessEqual: decimal vValor1 = 0, vValor2 = 0; #region Validaciones if (!Value1.IsDecimal()) { throw new OwlKeywordException(KeywordsType.If, string.Format(ETexts.GT(ErrorType.IfNonNumericValue), Type, "type", Value1, "value-1")); } else { vValor1 = Convert.ToDecimal(Value1); } if (!Value2.IsDecimal()) { throw new OwlKeywordException(KeywordsType.If, string.Format(ETexts.GT(ErrorType.IfNonNumericValue), Type, "type", Value2, "value-2")); } else { vValor2 = Convert.ToDecimal(Value2); } #endregion if (Type == ValidationType.Greater) { if (vValor1 > vValor2) { return(True); } else { return(False); } } else if (Type == ValidationType.Less) { if (vValor1 < vValor2) { return(True); } else { return(False); } } else if (Type == ValidationType.GreaterEqual) { if (vValor1 >= vValor2) { return(True); } else { return(False); } } else if (Type == ValidationType.LessEqual) { if (vValor1 <= vValor2) { return(True); } else { return(False); } } break; #endregion } return(string.Empty); }