private void EditSelectedItem(object selectedItem) { if (selectedItem is HostingUnit) { UpdateUnitWindow editUnit = new UpdateUnitWindow(((HostingUnit)selectedItem).HostingUnitKey); editUnit.ShowDialog(); RefreshUnits(); } else if (selectedItem is Order) { List <Order> myOrder = new List <Order>() { (Order)selectedItem }; UpdateOrderWindow upOrW = new UpdateOrderWindow(myOrder); upOrW.ShowDialog(); RefreshOrders(); } }
private void UpdateOrder_Click(object sender, RoutedEventArgs e) { Window w = new UpdateOrderWindow(); w.Show(); }