private void AddOrder() { AppJournal.Write("MainVM", "Add order record"); if (modeType == 2) { orderData.Add(new Order { Number = (orderData.Count + 1), FirmBroker = dataMananger.firmData, SelectedFirmBroker = dataMananger.firmData.FirstOrDefault(b => b.id == curBroker.id), Client = dataMananger.clientData, Issue = dataMananger.issueData, BottomPrice = 0, Step = 10, LastPrice = 0, CurrentPrice = 0, ModeType = dataMananger.modeData, Place = 0, StartCmdName = "Запуск", IsPrimary = true, PauseTime = 3000 }); OrdersVM orderVM = new OrdersVM(); orderVM.Orders = orderData; OrdersVM = orderVM; } else if (modeType == 1) { autoOrderData.Add(new AutoOrder { Number = (autoOrderData.Count + 1) }); AutoOrdersVM autoOrderVM = new AutoOrdersVM(); autoOrderVM.AutoOrders = autoOrderData; AutoOrdersVM = autoOrderVM; } ServerLogsTxt += "Заявка добавлена\n"; }