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

evalIsGreaterThan() private méthode

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

            cReportVariable w_item = fint.getVariables().item(C_ISGREATERTHAN);
            // the IsGreaterThan 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);
                }
            }
        }