public static Invoice InvoiceInsert(Invoice invoice) { invoice = invoice.Save(); FeedService.FeedAdd("Created", invoice); return invoice; }
public static bool InvoiceDelete(Invoice invoice) { Invoice.DeleteInvoice( new InvoiceCriteria { InvoiceId = invoice.InvoiceId }); FeedService.FeedAdd("Deleted", invoice); return true; }
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; }
public static Invoice InvoiceUpdate(Invoice invoice) { invoice = invoice.Save(); FeedService.FeedAdd("Updated", invoice); return invoice; }