public void CancellAllOrders(object sender, ExecutedRoutedEventArgs e) { CDataCancellAllOrders cancellAllOrders = (CDataCancellAllOrders)e.Parameter; CCancellAllOrders cao = new CCancellAllOrders(); List <int> lst = ViewModelDispatcher.GetConIdWithOrders(); foreach (var conId in lst) { Communicator.SendDataToServer(conId, cao, enmTradingEvent.CancellAllOrders); } }
public void CloseAllPositions(object sender, ExecutedRoutedEventArgs e) { CDataCloseAllPos dataCloseAllPos = (CDataCloseAllPos)e.Parameter; CCloseAllPositions closeAllPos = new CCloseAllPositions(); List <int> lst = ViewModelDispatcher.GetConIdLstWithOpenedPos(); foreach (var conId in lst) { Communicator.SendDataToServer(conId, closeAllPos, enmTradingEvent.CloseAllPositions); } }