protected override void CreateOrderRelation(Order closeOrder, AddOrderCommandBase command) { var openOrder = ((AddBOCloseOrdeCommand)command).OpenOrder; var addOrderRelationCommand = command.AddOrderRelationFactory.Create(openOrder, command.Result, openOrder.Lot); addOrderRelationCommand.Execute(); }
protected override void CreateOrderRelation(Order closeOrder, AddOrderCommandBase command) { var doneCommand = (AddDoneOrderCommandBase)command; var addOrderRelationCommand = command.AddOrderRelationFactory.Create(doneCommand.OpenOrder, command.Result, doneCommand.OpenOrder.LotBalance); addOrderRelationCommand.Execute(); }
public override void VisitAddPhysicalOrderCommand(AddOrderCommandBase command) { var instalmentOrderCommand = (AddInstalmentOrderOrderCommand)command; this.ParseCommon(instalmentOrderCommand); command.CreateOrder(); command.Result.CopyHitInfoFrom(instalmentOrderCommand.OldOrder); }
protected void CreateOrder(AddOrderCommandBase command) { Order order = command.CreateOrder(); if (!order.IsOpen) { this.CreateOrderRelation(order, command); } }
protected override void CreateOrderRelation(Order closeOrder, AddOrderCommandBase command) { var orderData = ((AddCommunicationCommandBase)command).OrderData; foreach (var eachOrderRelation in orderData.OrderRelations) { Logger.InfoFormat("begin create order relation openOrderId={0}, closeOrderId={1}, closedLot={2}", eachOrderRelation.OpenOrderId, eachOrderRelation.CloseOrderId, eachOrderRelation.ClosedLot); OrderRelationBLL.Commands.AddOrderRelationCommandBase addCommand = this.CreateAddOrderRelationCommand(command.AddOrderRelationFactory, closeOrder, eachOrderRelation); addCommand.Execute(); } }
protected abstract void CreateOrderRelation(Order closeOrder, AddOrderCommandBase command);
public override void VisitAddBOOrderCommand(AddOrderCommandBase command) { throw new NotImplementedException(); }
public override void VisitAddPhysicalOrderCommand(AddOrderCommandBase command) { this.ParseOrderRelaitonCommon((AddAutoCloseOrderCommandBase)command); }
protected override void CreateOrderRelation(Order closeOrder, AddOrderCommandBase command) { }
public override void VisitAddPhysicalOrderCommand(AddOrderCommandBase command) { this.ParsePhysicalOrder((AddPhysicalCutOrderCommand)command); this.CreateOrder(command); }
public override void VisitAddGeneralOrderCommand(AddOrderCommandBase command) { this.ParseOrder((AddCutOrderCommand)command); this.CreateOrder(command); }
public override void VisitAddBOOrderCommand(AddOrderCommandBase command) { this.ParseBOOrder((AddBOCloseOrdeCommand)command); }
protected override void CreateOrderRelation(Order closeOrder, AddOrderCommandBase command) { throw new NotImplementedException(); }