Esempio n. 1
0
        public static OutputInvoiceViewModel New(OutputInvoiceInfo source)
        {
            OutputInvoiceViewModel obj = new OutputInvoiceViewModel();

            obj.CopyFrom(source);
            return(obj);
        }
Esempio n. 2
0
        public static OutputInvoiceViewModel Get(long oid)
        {
            OutputInvoiceViewModel obj = new OutputInvoiceViewModel();

            obj.CopyFrom(OutputInvoiceInfo.Get(oid, false));
            return(obj);
        }
Esempio n. 3
0
        public static OutputInvoiceViewModel New()
        {
            OutputInvoiceViewModel obj = new OutputInvoiceViewModel();

            obj.CopyFrom(OutputInvoiceInfo.New());
            return(obj);
        }
Esempio n. 4
0
        public static void Add(OutputInvoiceViewModel item)
        {
            OutputInvoice newItem = OutputInvoice.New();

            item.CopyTo(newItem);
            newItem.Save();
            item.CopyFrom(newItem);
        }
Esempio n. 5
0
        public static OutputInvoiceViewModel Get(long oid, bool childs = false)
        {
            OutputInvoiceViewModel obj     = new OutputInvoiceViewModel();
            OutputInvoiceInfo      invoice = OutputInvoiceInfo.Get(oid, childs);

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

            obj.CopyFrom(invoice);

            if (childs)
            {
                obj.Lines = OutputInvoiceLineListViewModel.Get(invoice.ConceptoFacturas);
            }

            return(obj);
        }