DevTreks.Extensions/NPVCalculators/OCs/OCCalculator.cs
/// <summary>
/// Returns true if any parameters have changed
/// </summary>
Returns true if any parameters have changed
Returns true if any parameters have changed
private bool NeedsNewCalculation(Machinery1Input machInput,
            double lowestCapacity, int highestEquivPTO, int maxPTO)
        {
            bool bNeedsNewCalculation = false;
            if (machInput.OCAmount != lowestCapacity
                || machInput.AOHAmount != lowestCapacity)
            {
                return true;
            }
            int iHighestEquivPTO = 0;
            int iMaxPTO = 0;
            double dbFuelCost = 0;
            GetFuelVars(machInput, AgBudgetingHelpers.CALCULATOR_TYPES.agmachinery.ToString(),
                out iHighestEquivPTO, out iMaxPTO, out dbFuelCost);
            if (highestEquivPTO != iHighestEquivPTO
                || maxPTO != iMaxPTO)
            {
                return true;
            }
            return bNeedsNewCalculation;
        }
private bool NeedsNewCalculation ( Machinery1Input machInput , double lowestCapacity , int highestEquivPTO , int maxPTO ) { bool bNeedsNewCalculation = false ; if ( machInput . OCAmount != lowestCapacity || machInput . AOHAmount != lowestCapacity ) { return true ; } int iHighestEquivPTO = 0 ; int iMaxPTO = 0 ; double dbFuelCost = 0 ; GetFuelVars ( machInput , AgBudgetingHelpers . CALCULATOR_TYPES . agmachinery . ToString ( ) , out iHighestEquivPTO , out iMaxPTO , out dbFuelCost ) ; if ( highestEquivPTO != iHighestEquivPTO || maxPTO != iMaxPTO ) { return true ; } return bNeedsNewCalculation ; }
Returns true if any parameters have changed
Returns true if any parameters have changed
//see if any changes are needed //see if this differs from lowest joint params
machInput
Machinery1Input
lowestCapacity
double
highestEquivPTO
int
maxPTO
int