DevTreks.Data/AppHelpers/Prices.cs
/// <summary>
/// Copy and change input attributes over to input attributes that are specific to a subapplication
/// </summary>
Copy and change input attributes over to input attributes that are specific to a subapplication
Copy and change input attributes over to input attributes that are specific to a subapplication
private static void ChangeInputSubApplicationAttributes(XmlReader selectedNodeReader,
            Helpers.GeneralHelpers.SUBAPPLICATION_TYPES subAppType, bool isRecursive, string parentId, string baseTableId,
            XmlWriter writer)
        {
            string sAttName = string.Empty;
            string sAttValue = string.Empty;
            if (isRecursive == false)
            {
                writer.WriteAttributeString(USE_AOH, "0");
                writer.WriteAttributeString(INPUT_TIMES, "1");
                writer.WriteAttributeString(AOH_AMOUNT, "0");
                writer.WriteAttributeString(CAP_AMOUNT, "0");
                writer.WriteAttributeString(General.INCENTIVE_RATE, "0");
                writer.WriteAttributeString(General.INCENTIVE_AMOUNT, "0");
                writer.WriteAttributeString(INPUT_ID, baseTableId);
            }
            if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.budgets)
            {
                writer.WriteAttributeString(Economics1.BUDGETSYSTEM_TO_OPERATION_ID, parentId);
            }
            else if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.investments)
            {
                writer.WriteAttributeString(Economics1.COSTSYSTEM_TO_COMPONENT_ID, parentId);
            }
            else if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.outcomeprices)
            {
                writer.WriteAttributeString(OUTCOME_ID, parentId);
            }
            else if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.operationprices)
            {
                writer.WriteAttributeString(OPERATION_ID, parentId);
            }
            else if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.componentprices)
            {
                writer.WriteAttributeString(COMPONENT_ID, parentId);
            }
        }
private static void ChangeInputSubApplicationAttributes ( XmlReader selectedNodeReader , Helpers . GeneralHelpers . SUBAPPLICATION_TYPES subAppType , bool isRecursive , string parentId , string baseTableId , XmlWriter writer ) { string sAttName = string . Empty ; string sAttValue = string . Empty ; if ( isRecursive == false ) { writer . WriteAttributeString ( USE_AOH , " " ) ; writer . WriteAttributeString ( INPUT_TIMES , " " ) ; writer . WriteAttributeString ( AOH_AMOUNT , " " ) ; writer . WriteAttributeString ( CAP_AMOUNT , " " ) ; writer . WriteAttributeString ( General . INCENTIVE_RATE , " " ) ; writer . WriteAttributeString ( General . INCENTIVE_AMOUNT , " " ) ; writer . WriteAttributeString ( INPUT_ID , baseTableId ) ; } if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . budgets ) { writer . WriteAttributeString ( Economics1 . BUDGETSYSTEM_TO_OPERATION_ID , parentId ) ; } else if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . investments ) { writer . WriteAttributeString ( Economics1 . COSTSYSTEM_TO_COMPONENT_ID , parentId ) ; } else if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . outcomeprices ) { writer . WriteAttributeString ( OUTCOME_ID , parentId ) ; } else if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . operationprices ) { writer . WriteAttributeString ( OPERATION_ID , parentId ) ; } else if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . componentprices ) { writer . WriteAttributeString ( COMPONENT_ID , parentId ) ; } }
Copy and change input attributes over to input attributes that are specific to a subapplication
Copy and change input attributes over to input attributes that are specific to a subapplication
//write new attributes //copying an input/series from input list
selectedNodeReader
XmlReader
subAppType
Helpers.GeneralHelpers.SUBAPPLICATION_TYPES
isRecursive
bool
parentId
string
baseTableId
string
writer
XmlWriter