private void MenuItem_Click(object sender, RoutedEventArgs e) { BE.Order o = orderDataGrid.SelectedCells[0].Item as BE.Order; MenuItem m=sender as MenuItem; var win = new orderDeteils(o.OrderCode); // win.ordered_DishDataGrid.ItemsSource = myBl.getAllOrderByID(o.OrderCode); win.ShowDialog(); }
private void bill_Click(object sender, RoutedEventArgs e) { try { myIbl.AddOrder(new BE.Order(long.Parse(orderID.Text), DateTime.Now, myIbl.searchBranchByName(Branches.SelectedItem.ToString()), myIbl.searchBranchByName(Branches.SelectedItem.ToString()).kosherLevel,int.Parse(CallPhone.Text)), orderdish); BE.Order o = new BE.Order(long.Parse(orderID.Text), DateTime.Now, myIbl.searchBranchByName(Branches.SelectedItem.ToString()), myIbl.searchBranchByName(Branches.SelectedItem.ToString()).kosherLevel, int.Parse(CallPhone.Text)); var win = new orderDeteils(o.OrderCode); win.ShowDialog(); Exit_Click(new Button(), null); } catch (Exception) { MessageBox.Show("הכנס פריטים"); } }