private void Button_Show_Click(object sender, RoutedEventArgs e) { Customer selectedItem = (Customer)customerDataGrid.SelectedItem; Customer foundCustomer = repository.FindCustomerInvoicesById(selectedItem, _context); CustomerDetailsWindow customerDetailsWindow = new CustomerDetailsWindow(foundCustomer); service.OnSubViewDetailsShow(customerDetailsWindow, RightViewBox); }
/// <summary> /// Show details screen for customer entity /// </summary> /// <param name="customerDetailsWindow">CustomerDetailsWindow object</param> /// <param name="RightViewBox">Grid object</param> public void OnSubViewDetailsShow(CustomerDetailsWindow customerDetailsWindow, Grid RightViewBox) { RightViewBox.Children.Clear(); RightViewBox.VerticalAlignment = VerticalAlignment.Stretch; RightViewBox.HorizontalAlignment = HorizontalAlignment.Stretch; RightViewBox.Children.Add(customerDetailsWindow); }