public static object ToPair(this NameParameterForAnalysis parameter) { return(new { Name = parameter.GetDesignation(), Description = parameter.GetDescription(), Value = parameter.GetName() }); }
public static object ToRestriction(this NameParameterForAnalysis parameter, ConditionType conditionType, double value) { dynamic result = new ExpandoObject(); result.name = parameter.GetDesignation(); result.description = parameter.GetDescription(); result.unit = parameter.GetUnit().GetDesignation(); result.condition = conditionType.GetDesignation(); result.value = value; result.restrictionName = parameter.GetName(); return(result); }
public static object ToParameter(this NameParameterForAnalysis parameter, double?value, bool correct) { return(new { Name = parameter.GetName(), Designation = parameter.GetDesignation(), Description = parameter.GetDescription(), Unit = parameter.GetUnit().GetDesignation(), Value = value.HasValue ? value.Value.ToString() : "_", Correct = correct }); }
public string GetDesignation() { if (!HelperEnum.IsDefault(ParameterWithEnter)) { return(ParameterWithEnter.GetDesignation()); } if (!HelperEnum.IsDefault(ParameterWithCalculation)) { return(ParameterWithCalculation.GetDesignation()); } if (!HelperEnum.IsDefault(ParameterForAnalysis)) { return(ParameterForAnalysis.GetDesignation()); } return(""); }