Beispiel #1
0
        public ActionResult Update(UpdateInvoiceSaleCommand model)
        {
            model.Children.Add(new InvoiceSaleChild(5, model.SeqId, 8900, 11, 12002));
            model.Children.Add(new InvoiceSaleChild(6, model.SeqId, 7950, 22, 15005));
            model.Children.Add(new InvoiceSaleChild(0, model.SeqId, 8008, 100, 414141));

            Bus.Dispatch(model);
            return(View());
        }
        public void Handle(UpdateInvoiceSaleCommand handle)
        {
            var inv = new Domain.Model.InvoiceSale.InvoiceSale(handle.SeqId, handle.TotalSum);

            foreach (var x in handle.Children)
            {
                inv.Children.Add(new InvoiceSaleChild(x.Id, handle.SeqId, x.GoodsId, x.Counts, x.Price));
            }
            _invoiceSaleRepository.Update(inv);
        }