Example #1
0
        public void SetTotalNPV1Total1Attributes(NPV1Total1 ind, string attNameExtension, ref XmlWriter writer)
        {
            bool bIsCostNode    = CalculatorHelpers.IsCostNode(this.CalcParameters.CurrentElementNodeName);
            bool bIsBenefitNode = CalculatorHelpers.IsBenefitNode(this.CalcParameters.CurrentElementNodeName);
            bool bIsBoth        = (bIsBenefitNode == false && bIsCostNode == false) ? true : false;

            if (bIsCostNode || bIsBoth)
            {
                ind.SetTotalCostsSummaryAttributes(attNameExtension, ref writer);
                if (this.CalcParameters.SubApplicationType == Constants.SUBAPPLICATION_TYPES.inputprices)
                {
                    //limited ps and qs
                    ind.SetTotalOCPricePsandQsAttributes(attNameExtension, ref writer);
                }
                else
                {
                    if (this.CalcParameters.SubApplicationType != Constants.SUBAPPLICATION_TYPES.componentprices &&
                        this.CalcParameters.SubApplicationType != Constants.SUBAPPLICATION_TYPES.operationprices)
                    {
                        ind.SetTotalCostsSummaryNetsAttributes(attNameExtension, ref writer);
                    }
                    if (this.CalcParameters.CurrentElementNodeName.Contains(Input.INPUT_PRICE_TYPES.input.ToString()))
                    {
                        //limited ps and qs
                        ind.SetTotalCostsPsandQsAttributes(attNameExtension, ref writer);
                    }
                }
            }
            if (bIsBenefitNode || bIsBoth)
            {
                ind.SetTotalBenefitsSummaryAttributes(attNameExtension, ref writer);
                ind.SetTotalBenefitsPsandQsAttributes(attNameExtension, ref writer);
            }
        }