Ejemplo n.º 1
0
        public static void AssignedMap <T>(T obj, DataRow row, ReturnMap <T> rMap, bool propertyNameIgnoreCase, bool skipNotExistProperty) where T : class
        {
            if (rMap == null)
            {
                return;
            }
            List <PropertyColumn> maps = rMap.GetMaps();

            if (maps == null || maps.Count <= 0)
            {
                return;
            }
            foreach (PropertyColumn map in maps)
            {
                object val = row[map.Column];
                if (map.PropertyList == null || map.PropertyList.Count <= 0)
                {
                    continue;
                }
                else
                {
                    string[] pNames = map.PropertyList.ToArray();
                    val = DataMapper.ConvertIfEnum(val, typeof(T), pNames, propertyNameIgnoreCase, skipNotExistProperty);
                    FillFieldValue(obj, pNames, val, propertyNameIgnoreCase, skipNotExistProperty);
                }
            }
        }
Ejemplo n.º 2
0
 public static void AssignedMap <T>(T obj, DataRow row, ReturnMap <T> rMap) where T : class
 {
     AssignedMap <T>(obj, row, rMap, true, true);
 }
Ejemplo n.º 3
0
        // ------------- Assigned Map Return Entity ------------

        public static void AssignedMap <T>(T obj, IDataReader reader, ReturnMap <T> rMap) where T : class
        {
            AssignedMap <T>(obj, reader, rMap, true, true);
        }