Пример #1
0
        public static void Edit(OutputDeliveryViewModel source, HttpRequestBase request = null)
        {
            OutputDelivery item = OutputDelivery.Get(source.Oid, ETipoEntidad.Cliente);

            source.CopyTo(item, request);
            item.Save();
        }
Пример #2
0
        public static OutputDeliveryViewModel New(OutputDeliveryInfo source)
        {
            OutputDeliveryViewModel obj = new OutputDeliveryViewModel();

            obj.CopyFrom(source);
            return(obj);
        }
Пример #3
0
        public static void Add(OutputDeliveryViewModel item)
        {
            OutputDelivery newItem = OutputDelivery.New();

            item.CopyTo(newItem);
            newItem.Save();
            item.CopyFrom(newItem);
        }
Пример #4
0
        public static OutputDeliveryViewModel New()
        {
            OutputDeliveryViewModel obj = new OutputDeliveryViewModel();

            obj.CopyFrom(OutputDeliveryInfo.New());
            obj.Lines = new OutputDeliveryLineListViewModel();

            return(obj);
        }
Пример #5
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);
        }