private void ButtonAdd_Click(object sender, RoutedEventArgs e) { OrderWindow w = new OrderWindow(hb); if (w.ShowDialog() == true) { UpdateAll(); } }
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(); }
public void OpenOrderWindow(IntPtr targetHandle) { var window = new OrderWindow() { DataContext = this.OrderViewModel }; this.OrderViewModel.TargetHandle = targetHandle; window.ShowDialog(); }
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(); }
private void createNewOrder() { OrderWindow dlg = new OrderWindow(null); if (dlg.ShowDialog() == true) { refreshOrderWindow(); } else { refreshOrderWindow(); } }
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."); } }
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(); }
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(); } }
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"); } }