Beispiel #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();
        }
Beispiel #2
0
        public static OutputDeliveryViewModel New(OutputDeliveryInfo source)
        {
            OutputDeliveryViewModel obj = new OutputDeliveryViewModel();

            obj.CopyFrom(source);
            return(obj);
        }
Beispiel #3
0
        public static void Add(OutputDeliveryViewModel item)
        {
            OutputDelivery newItem = OutputDelivery.New();

            item.CopyTo(newItem);
            newItem.Save();
            item.CopyFrom(newItem);
        }
Beispiel #4
0
        public static OutputDeliveryViewModel New()
        {
            OutputDeliveryViewModel obj = new OutputDeliveryViewModel();

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

            return(obj);
        }
Beispiel #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);
        }