private void AddOrder_OnClick(object sender, RoutedEventArgs e) { var vm = (OrderBookViewModel) DataContext; var dlg = new AddOrder(); dlg.SetDefaultClOrdID(vm.CreateClOrdID()); var result = dlg.ShowDialog(); if (result.HasValue && result.Value) { var orderDetails = dlg.GetOrderDetails(); vm.SubmitNewOrder(orderDetails); } }
private void AddOrder_OnClick(object sender, RoutedEventArgs e) { var vm = (OrderBookViewModel)DataContext; var dlg = new AddOrder(); dlg.SetDefaultClOrdID(vm.CreateClOrdID()); var result = dlg.ShowDialog(); if (result.HasValue && result.Value) { var orderDetails = dlg.GetOrderDetails(); vm.SubmitNewOrder(orderDetails); } }