Exemple #1
0
        public void CallExternalEvent()
        {
            var locator = Revenj.Client.Start();
            var invoice = new Invoice().Create();
            var coffee = new Invoice.AddItem { Product = "coffee", Price = 3.14m };
            var milk = new Invoice.AddItem { Product = "milk", Price = 2.71m };

            coffee.Submit(invoice);
            milk.Submit(invoice);
        }
Exemple #2
0
    void Handle(Input.Requestinvoice input)
    {
        var invoice = new Billing.Invoice();
        invoice.DateTime = DateTime.Now;
        invoice.TotalPrice = 0;

        for (int i = Orders.Count - 1; i >= 0; i--)
        {
            OrdersPageOrders order = Orders[i];
            Billing.Order orderData = (Billing.Order)order.Data;
            invoice.TotalPrice += orderData.Offer.Price;
            orderData.Invoice = invoice;
            Orders.Remove(order);
        }

        Transaction.Commit();
    }