void EditSelectedOrder() { OrderEditWindow editWindow = new OrderEditWindow(model.SelectedOrder) { Owner = this }; editWindow.ShowDialog(); }
private void ButtonAddOrder_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { Order order = model.CreateNewOrder(); OrderEditWindow editWindow = new OrderEditWindow(order) { Owner = this }; if (editWindow.ShowDialog() != true) { model.DeleteSelectedOrder(); } }