Beispiel #1
0
        public void Handle(OrderUnpairedFromManualRideLinq @event)
        {
            using (var context = _contextFactory.Invoke())
            {
                var order = context.Find <OrderDetail>(@event.SourceId);
                if (order != null)
                {
                    order.Status = (int)OrderStatus.Canceled;
                    context.Save(order);
                }

                var orderStatusDetails = context.Find <OrderStatusDetail>(@event.SourceId);
                if (orderStatusDetails != null)
                {
                    orderStatusDetails.Status = OrderStatus.Canceled;
                    context.Save(orderStatusDetails);
                }

                var rideLinqDetails = context.Find <OrderManualRideLinqDetail>(@event.SourceId);
                if (rideLinqDetails != null)
                {
                    // Must set an endtime to end order on client side
                    rideLinqDetails.EndTime     = @event.EventDate;
                    rideLinqDetails.IsCancelled = true;

                    context.Save(rideLinqDetails);
                }
            }
        }
 public void Handle(OrderUnpairedFromManualRideLinq @event)
 {
     using (var context = _contextFactory.Invoke())
     {
         var orderReport = context.Find <OrderReportDetail>(@event.SourceId);
         orderReport.Payment.IsPaired             = false;
         orderReport.OrderStatus.OrderIsCancelled = true;
         orderReport.OrderStatus.Status           = OrderStatus.Canceled;
         context.Save(orderReport);
     }
 }
Beispiel #3
0
 private void OnOrderUnpairedFromManualRideLinq(OrderUnpairedFromManualRideLinq @event)
 {
     _status = OrderStatus.Canceled;
 }