예제 #1
0
        public static Invoice InvoiceInsert(Invoice invoice)
        {
            invoice = invoice.Save();

            FeedService.FeedAdd("Created", invoice);

            return invoice;
        }
예제 #2
0
        public static bool InvoiceDelete(Invoice invoice)
        {
            Invoice.DeleteInvoice(
                new InvoiceCriteria
                    {
                        InvoiceId = invoice.InvoiceId
                    });

            FeedService.FeedAdd("Deleted", invoice);

            return true;
        }
예제 #3
0
        public static Invoice InvoiceSave(Invoice invoice)
        {
            if (!invoice.IsValid)
            {
                return invoice;
            }

            Invoice result;

            if (invoice.IsNew)
            {
                result = InvoiceService.InvoiceInsert(invoice);
            }
            else
            {
                result = InvoiceService.InvoiceUpdate(invoice);
            }

            return result;
        }
예제 #4
0
        public static Invoice InvoiceUpdate(Invoice invoice)
        {
            invoice = invoice.Save();

            FeedService.FeedAdd("Updated", invoice);

            return invoice;
        }