Exemplo n.º 1
0
        public static string GetContaDesc(this ConsignContainerGoodsDto dto)
        {
            var dic = new Dictionary <string, int?>()
            {
                { "20GP", dto.Gp20 },
                { "40GP", dto.Gp40 },
                { "40HQ", dto.Hq40 },
                { "45HQ", dto.Hq45 },
            };

            return(string.Join(";", dic.Where(kv => kv.Value.HasValue && kv.Value > 0)
                               .Select(kv => string.Format("{0}x{1}", kv.Value, kv.Key))));
        }
Exemplo n.º 2
0
 public static IEnumerable <string> GetGoodsDescs(this ConsignContainerGoodsDto dto)
 {
     return(dto.Goodses.Select(g => string.Format("{0} ({1} {2})", g.GoodsDesc, g.Qty, g.QtyUnit)));
 }