CSReportDll.cReportCompiler.evalIsLessThan C# (CSharp) Méthode

evalIsLessThan() private méthode

private evalIsLessThan ( cReportFormulaInt fint ) : void
fint cReportFormulaInt
Résultat void
        private void evalIsLessThan(cReportFormulaInt fint)
        {
            if (fint.getVariables().item(C_ISLESSTHAN) == null)
            {
                fint.getVariables().add(null, C_ISLESSTHAN);
            }

            cReportVariable w_item = fint.getVariables().item(C_ISLESSTHAN);
            // the IsLessThan function is for numbers
            //
            object value = m_report.getValue(fint.getParameters().item(0).getValue(), true);
            object constValue = fint.getParameters().item(1).getValue();

            if (value.GetType() == typeof(String))
            {
                String strValue = value.ToString();
                String strConstValue = constValue.ToString();

                if (String.Compare(strValue.ToString(),
                                    strConstValue.ToString(),
                                    StringComparison.CurrentCulture) < 0)
                {
                    w_item.setValue(true);
                }
                else
                {
                    w_item.setValue(false);
                }
            }
            else
            {
                if ((double)value < (double)constValue)
                {
                    w_item.setValue(true);
                }
                else
                {
                    w_item.setValue(false);
                }
            }
        }