DevTreks.Data/AppHelpers/Prices.cs
/// <summary>
/// Copy and change operation/component attributes that are specific to a subapplication
/// </summary>
Copy and change operation/component attributes that are specific to a subapplication
Copy and change operation / component attributes that are specific to a subapplication
private static void ChangeOperationComponentSubApplicationAttributes(Helpers.GeneralHelpers.SUBAPPLICATION_TYPES subAppType,
            XmlReader selectedNodeReader, string parentId, string baseTableId, XmlWriter writer)
        {
            string sAttName = string.Empty;
            string sAttValue = string.Empty;
            if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.budgets)
            {
                writer.WriteAttributeString(Economics1.BUDGETSYSTEM_TO_TIME_ID, parentId);
                writer.WriteAttributeString(OPERATION_ID, baseTableId);
                sAttName = OPERATION_GROUP_NAME;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = OPERATION_GROUP_ID;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = Calculator.cTypeId;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = Calculator.cTypeName;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
            }
            else if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.investments)
            {
                writer.WriteAttributeString(Economics1.COSTSYSTEM_TO_TIME_ID, parentId);
                writer.WriteAttributeString(COMPONENT_ID, baseTableId);
                sAttName = COMPONENT_GROUP_NAME;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = COMPONENT_GROUP_ID;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = Calculator.cTypeId;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = Calculator.cTypeName;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
            }
            else if (subAppType == Helpers.GeneralHelpers.SUBAPPLICATION_TYPES.outcomeprices)
            {
                writer.WriteAttributeString(Economics1.COSTSYSTEM_TO_TIME_ID, parentId);
                writer.WriteAttributeString(OUTCOME_ID, baseTableId);
                sAttName = OUTCOME_GROUP_NAME;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = OUTCOME_GROUP_ID;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = Calculator.cTypeId;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
                sAttName = Calculator.cTypeName;
                writer.WriteAttributeString(sAttName, selectedNodeReader.GetAttribute(sAttName));
            }
        }
private static void ChangeOperationComponentSubApplicationAttributes ( Helpers . GeneralHelpers . SUBAPPLICATION_TYPES subAppType , XmlReader selectedNodeReader , string parentId , string baseTableId , XmlWriter writer ) { string sAttName = string . Empty ; string sAttValue = string . Empty ; if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . budgets ) { writer . WriteAttributeString ( Economics1 . BUDGETSYSTEM_TO_TIME_ID , parentId ) ; writer . WriteAttributeString ( OPERATION_ID , baseTableId ) ; sAttName = OPERATION_GROUP_NAME ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = OPERATION_GROUP_ID ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = Calculator . cTypeId ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = Calculator . cTypeName ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; } else if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . investments ) { writer . WriteAttributeString ( Economics1 . COSTSYSTEM_TO_TIME_ID , parentId ) ; writer . WriteAttributeString ( COMPONENT_ID , baseTableId ) ; sAttName = COMPONENT_GROUP_NAME ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = COMPONENT_GROUP_ID ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = Calculator . cTypeId ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = Calculator . cTypeName ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; } else if ( subAppType == Helpers . GeneralHelpers . SUBAPPLICATION_TYPES . outcomeprices ) { writer . WriteAttributeString ( Economics1 . COSTSYSTEM_TO_TIME_ID , parentId ) ; writer . WriteAttributeString ( OUTCOME_ID , baseTableId ) ; sAttName = OUTCOME_GROUP_NAME ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = OUTCOME_GROUP_ID ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = Calculator . cTypeId ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; sAttName = Calculator . cTypeName ; writer . WriteAttributeString ( sAttName , selectedNodeReader . GetAttribute ( sAttName ) ) ; } }
Copy and change operation/component attributes that are specific to a subapplication
Copy and change operation / component attributes that are specific to a subapplication
//write subapplication specific attributes //write base table id //write base table id //write base table id
subAppType
Helpers.GeneralHelpers.SUBAPPLICATION_TYPES
selectedNodeReader
XmlReader
parentId
string
baseTableId
string
writer
XmlWriter