private void OnModifyQuantity() { var viewModel = new ModifyQtyViewModel(); viewModel.PortfolioId = Id; viewModel.OnceQuantity = Quantity; viewModel.MaxQuantity = MaxPosition; ModifyMaxQtyDlg dlg = new ModifyMaxQtyDlg(viewModel); dlg.Owner = System.Windows.Application.Current.MainWindow; bool?ret = dlg.ShowDialog(); if (ret ?? false) { int onceQty = viewModel.OnceQuantity; int maxQty = viewModel.MaxQuantity; if (_accountVm.VerifyStatus()) { _accountVm.Host.PortfModifyQuantity(Id, onceQty, maxQty); EventLogger.Write("{0} 修改组合 {1}数量: 每次 {2}, 最大 {3}", _accountVm.InvestorId, DisplayText, onceQty, maxQty); } } }
private void OnModifyQuantity() { var viewModel = new ModifyQtyViewModel(); viewModel.PortfolioId = Id; viewModel.OnceQuantity = Quantity; viewModel.TotalOpenLimit = TotalOpenLimit; viewModel.MaxOpenPerStart = MaxOpenPerStart; viewModel.MaxCancel = MaxCancel; viewModel.EndTimePointsExpr = EndTimePointsExpr; ModifyMaxQtyDlg dlg = new ModifyMaxQtyDlg(viewModel); dlg.Owner = System.Windows.Application.Current.MainWindow; bool?ret = dlg.ShowDialog(); if (ret ?? false) { Quantity = viewModel.OnceQuantity; TotalOpenLimit = viewModel.TotalOpenLimit; MaxOpenPerStart = viewModel.MaxOpenPerStart; MaxCancel = viewModel.MaxCancel; EndTimePointsExpr = viewModel.EndTimePointsExpr; if (_accountVm.VerifyStatus()) { _accountVm.Host.PortfModifyQuantity(Id, Quantity, MaxOpenPerStart, TotalOpenLimit, MaxCancel, viewModel.getEndTimePoints()); EventLogger.Write("{0} 修改组合 {1}数量: 每次->{2}, 每组->{3}, 最多->{4}, 撤单->{5}", _accountVm.InvestorId, DisplayText, Quantity, MaxOpenPerStart, TotalOpenLimit, MaxCancel); } } }