Beispiel #1
0
        static public void Map <T>(esEntityCollectionBase src, List <T> dst)
        {
            if (src != null && src.Count > 0 && dst != null && dst.Count > 0)
            {
                if (src.Count == dst.Count)
                {
                    IEnumerable iEnum = src as IEnumerable;
                    var         x     = iEnum.GetEnumerator();

                    int i = 0;
                    foreach (esEntity entity in iEnum)
                    {
                        esSmartDto dto = dst[i++] as esSmartDto;
                        dto.HrydateFromEntity(entity);
                    }
                }
            }
        }
Beispiel #2
0
        static private bool FieldsExists(esSmartDto entity)
        {
            if (entity.currentValues == null || entity.currentValues.Count == 0)
            {
                if (entity.rowState == esDataRowState.Added && !entity.applyDefaultsCalled)
                {
                    entity.applyDefaultsCalled = true;
                    entity.ApplyDefaults();

                    if (entity.currentValues != null)
                    {
                        return(true);
                    }
                }

                return(false);
            }

            return(true);
        }
Beispiel #3
0
 static public void Map(esSmartDto src, esEntity dst)
 {
     dst.HrydateFromDto(src);
 }
Beispiel #4
0
 static public void Map(esEntity src, esSmartDto dst)
 {
     dst.HrydateFromEntity(src);
 }