private void ConfirmExecute(object parameter) { AddSellOrderCollectionWindow AddSellOrderCollectionWindow = parameter as AddSellOrderCollectionWindow; CallBack(SellOrderCollection); AddSellOrderCollectionWindow.Close(); }
private void CancelExecute(object parameter) { SellOrderCollection = null; AddSellOrderCollectionWindow AddSellOrderCollectionWindow = parameter as AddSellOrderCollectionWindow; CallBack(SellOrderCollection); AddSellOrderCollectionWindow.Close(); }
private void AddSellOrderCollectionExecute(object parameter) { if (OutSellOrderButtonIsEnabled) { string message = "已存在一个订单,无法添加订单"; string detailMessage = "同一时间只允许存在一个订单,不允许同一时间编辑两个订单"; WarningWindow warn = new WarningWindow(message, detailMessage); warn.ShowDialog(); } else { AddSellOrderCollectionWindow AddSellOrderCollectionWindow = new AddSellOrderCollectionWindow(); AddSellOrderCollectionWindowViewModel vm = AddSellOrderCollectionWindow.DataContext as AddSellOrderCollectionWindowViewModel; vm.CallBack = new Action <SellOrderCollection>(AddSellOrderCollectionCallBackAction); AddSellOrderCollectionWindow.Show(); } }