Exemplo n.º 1
0
        private void ButtonAdd_Click(object sender, RoutedEventArgs e)
        {
            OrderWindow w = new OrderWindow(hb);

            if (w.ShowDialog() == true)
            {
                UpdateAll();
            }
        }
Exemplo n.º 2
0
        private void ButtonEdit_Click(object sender, RoutedEventArgs e)
        {
            OrderWindow w = new OrderWindow(hb, hb.ListOrders.First(o => o.Id == ordersViews[ListViewOrders.SelectedIndex].Id));

            if (w.ShowDialog() == true)
            {
                UpdateAll();
            }
        }
        //Edit selected Order
        private void EditOrder()
        {
            OrderWindow wind = new OrderWindow(false)
            {
                DataContext = this.DataContext
            };

            wind.ShowDialog();
        }
        //Add New Order
        private void AddOrderButton_Click(object sender, RoutedEventArgs e)
        {
            OrderWindow wind = new OrderWindow(true)
            {
                DataContext = this.DataContext
            };

            wind.ShowDialog();
        }
Exemplo n.º 5
0
        public void OpenOrderWindow(IntPtr targetHandle)
        {
            var window = new OrderWindow()
            {
                DataContext = this.OrderViewModel
            };

            this.OrderViewModel.TargetHandle = targetHandle;
            window.ShowDialog();
        }
Exemplo n.º 6
0
        private void btnEditDR_Click(object sender, RoutedEventArgs e)
        {
            OrderHistoryModel orderHistMod = dgvdr.SelectedItem as OrderHistoryModel;

            if (orderHistMod != null)
            {
                OrderWindow orderWin = new OrderWindow(viewMegaStockist, orderHistMod);
                orderWin.ShowDialog();
            }
        }
 private void OnShowOrder()
 {
     LoadCustomerAndOrderTickets(Customer.Order);
     OrderDialogTitle = String.Format("Заказ № {0} - {1}", Customer.Order.Id,
                                      BaseData.GetStatus(Customer.Order.Status));
     OrderStatus  = Customer.Order.Status;
     _orderWindow = new OrderWindow {
         Owner = MetroWindow
     };
     _orderWindow.ShowDialog();
 }
Exemplo n.º 8
0
        private void createNewOrder()
        {
            OrderWindow dlg = new OrderWindow(null);

            if (dlg.ShowDialog() == true)
            {
                refreshOrderWindow();
            }
            else
            {
                refreshOrderWindow();
            }
        }
Exemplo n.º 9
0
        private async void btnAddDR_Click(object sender, RoutedEventArgs e)
        {
            MahApps.Metro.Controls.MetroWindow window = Window.GetWindow(this) as MahApps.Metro.Controls.MetroWindow;

            if (viewMegaStockist != null)
            {
                OrderWindow ow = new OrderWindow(viewMegaStockist, null);
                ow.ShowDialog();
            }
            else
            {
                await window.ShowMessageAsync("ADDING DR", "Please click View DR for selected client.");
            }
        }
Exemplo n.º 10
0
        private void listview_onDoubleClick(object sender, RoutedEventArgs e)
        {
            // o.listView_leg.Items[0]= ((DataRowView)((ListView)sender).SelectedItem)["Order No."].ToString();
            // long on = long.Parse(((DataRowView)((ListView)sender).SelectedItem)["Order No."].ToString());
            //  o.listView_leg.Items.Add(this.dictionary_orders[on]);
            ListView l  = (ListView)sender;
            Order    or = (Order)l.SelectedItem;
            // MessageBox.Show(or.order_number+" "+or.driver_name);
            OrderWindow o = new OrderWindow(mainwindow, or);

            o.ShowDialog();
            // Populate list
            //this.listView.Items.Add(new MyItem { Id = 1, Name = "David" });
            //((DataRowView)((ListView)sender).SelectedItem)["column_name"].ToString();
        }
Exemplo n.º 11
0
        private void editCurrentOrder()
        {
            if (lvOrders.SelectedIndex == -1)
            {
                return;
            }
            ListOrderItem loi = (ListOrderItem)lvOrders.SelectedItem;
            Order         o   = new Order {
                id = loi.id
            };
            OrderWindow dlg = new OrderWindow(o);

            if (dlg.ShowDialog() == true)
            {
                refreshOrderWindow();
            }
            else
            {
                refreshOrderWindow();
            }
        }
Exemplo n.º 12
0
        private void LoginBtnClick(object sender, RoutedEventArgs e)
        {
            AccountProcess account = new AccountProcess();

            if (accountText.Text == "" | passwordText.Password == "")
            {
                DialogShow.ShowOkDialog("warning", "Have item empty!");
                return;
            }
            else if (account.Login(accountText.Text, passwordText.Password))
            {
                this.Hide();
                OrderWindow a = new OrderWindow();
                a.ShowDialog();
                this.Close();
            }
            else
            {
                DialogShow.ShowOkDialog("Error", "Not match account or password");
            }
        }