private static void InitGanttImage(Hashtable Images, List <string> imgNames) { if (imgNames != null) { LookupTypeItem[] lookupitems = new LookupTypeItem[imgNames.Count]; int i = 0; if (imgNames.Count > 0) { foreach (string img in imgNames) { string url = "/_layouts/images/" + img; LookupTypeItem li = new LookupTypeItem(Images[img.ToLower()], "") { ImageUrl = url }; if (li.Value != null && li.Value.ToString() != "") { lookupitems[i] = li; } i++; } lookupTypeInfo = new LookupTypeInfo("GanttImage", lookupitems) { ShowImage = true, ShowText = false }; } } }
private void ReadAndCheckTypeInfo() { TypeInfo = new LookupTypeInfo(typeof(TInput), typeof(TSourceOutput)); if (TypeInfo.MatchColumns.Count == 0 || TypeInfo.RetrieveColumns.Count == 0) { throw new ETLBoxException("Please define either a transformation function or use the MatchColumn / RetrieveColumn attributes."); } }
private void DefaultFuncWithMatchRetrieveAttributes() { TypeInfo = new LookupTypeInfo(typeof(TInput), typeof(TSourceOutput)); if (TypeInfo.MatchColumns.Count == 0 || TypeInfo.RetrieveColumns.Count == 0) { throw new ETLBoxException("Please define either a transformation function or use the MatchColumn / RetrieveColumn attributes."); } TransformationFunc = FindRowByAttributes; }
private void DefaultFuncWithMatchRetrieveAttributes() { TypeInfo = new LookupTypeInfo(typeof(TInput), typeof(TSource)); if (MatchColumns != null && RetrieveColumns != null) { FillAttributeMappingFromProperties(); } else if (TypeInfo.MatchColumns.Count > 0 && TypeInfo.RetrieveColumns.Count > 0) { FillAttributeMappingFromAttributes(); } else { throw new ETLBoxException("Please define either a transformation function or use the MatchColumn / RetrieveColumn attributes."); } TransformationFunc = FindRowByAttributes; }