public static OutputDeliveryLineListViewModel Get(OutputDeliveryLines sourceList)
        {
            OutputDeliveryLineListViewModel list = new OutputDeliveryLineListViewModel();

            foreach (OutputDeliveryLine item in sourceList)
            {
                list.Add(OutputDeliveryLineViewModel.New(item));
            }

            return(list);
        }
Esempio n. 2
0
        public static OutputDeliveryViewModel Get(long oid, bool childs = false)
        {
            OutputDeliveryViewModel obj      = new OutputDeliveryViewModel();
            OutputDeliveryInfo      delivery = OutputDeliveryInfo.Get(oid, ETipoEntidad.Cliente, childs);

            if (delivery == null)
            {
                return(null);
            }

            obj.CopyFrom(delivery);

            if (childs)
            {
                obj.Lines = OutputDeliveryLineListViewModel.Get(delivery.Conceptos);
            }

            return(obj);
        }