예제 #1
0
 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
             };
         }
     }
 }
예제 #2
0
 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.");
     }
 }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }