/// <summary> /// Updates input column custom property (GUIDs) /// </summary> /// <param name="col">the SSIS input column</param> /// <param name="componentMetaData">>the components metadata</param> /// <param name="isagCustomProperties">the components custom properties</param> private static void UpdateInputIdProperty(IDTSInputColumn100 col, IDTSComponentMetaData100 componentMetaData, IsagCustomProperties isagCustomProperties) { string guid; bool save = false; if (HasIdProperty(col.CustomPropertyCollection, PropertyType.OutputColumn)) { guid = (string)col.CustomPropertyCollection[IdPorpertyNameList[(int)PropertyType.OutputColumn]].Value; foreach (OutputConfig config in isagCustomProperties.OutputConfigList) { if (config.CustomId == guid) { config.DftColumnId = col.ID; save = true; } } } if (HasIdProperty(col.CustomPropertyCollection, PropertyType.ValidParamter)) { guid = (string)col.CustomPropertyCollection[IdPorpertyNameList[(int)PropertyType.ValidParamter]].Value; if (isagCustomProperties.LU2_ValidparameterCustomId == guid) { isagCustomProperties.LU2_ValidparameterId = col.ID; save = true; } } if (HasIdProperty(col.CustomPropertyCollection, PropertyType.MatchParameter)) { guid = (string)col.CustomPropertyCollection[IdPorpertyNameList[(int)PropertyType.MatchParameter]].Value; if (isagCustomProperties.LU_MatchparameterCustomId == guid) { isagCustomProperties.LU_MatchparameterId = col.ID; save = true; } } if (save) { isagCustomProperties.Save(componentMetaData); } }
/// <summary> /// Updates a ColumnConfig and saves the components custom properties /// </summary> /// <param name="config">ColumnConfig</param> /// <param name="col">SSIS column</param> /// <param name="componentMetaData">componets metadata</param> /// <param name="isagCustomProperties">components custom properties</param> private static void UpdateColumnConfig(ColumnConfig config, IDTSInputColumn100 col, IDTSComponentMetaData100 componentMetaData, IsagCustomProperties isagCustomProperties) { config.InputColumnId = col.ID; isagCustomProperties.Save(componentMetaData); }