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

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

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

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

            return(obj);
        }
Exemplo n.º 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);
        }