Example #1
0
        private void OrderBtn_Add_Click(object sender, RoutedEventArgs e)
        {
            AddOrder AO = new AddOrder(H);

            AO.Show();
            this.Visibility = Visibility.Collapsed;
        }
Example #2
0
        private void addOrder_Click(object sender, RoutedEventArgs e)
        {
            AddOrder Window = new AddOrder(CurrentHost);

            Window.ShowDialog();
            ListView_Reqest.ItemsSource = new ObservableCollection <GuestRequest>(MainWindow.myBl.GetRequests().Where(x => x.Status == RequestStatus.Open));
            DGrid.ItemsSource           = new ObservableCollection <Order>(MainWindow.myBl.GetOrdersByHost(CurrentHost));
        }
Example #3
0
 private void AddOrder_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Window addWindow = new AddOrder(Convert.ToInt64(host.HostKey1), user);
         addWindow.Show();
         this.Close();
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc + " please add requests or wait for a guest to add");
     }
 }
        private void guests_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (guests.SelectedItem != null)
            {
                guests.CommitEdit();
                guests.CommitEdit();
                orders.CommitEdit();
                orders.CommitEdit();

                AddOrder Window = new AddOrder(((GuestRequest)guests.SelectedItem), index2);
                Window.ShowDialog();
                lst  = myBL.getGuestRequests();
                lst3 = myBL.getOrders();
                guests.ItemsSource = lst;
                orders.ItemsSource = lst3;

                guests.Items.Refresh();
                orders.Items.Refresh();
                guests.CancelEdit();
                guests.CancelEdit();
                orders.CancelEdit();
                orders.CancelEdit();
            }
        }