private void dou_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Nanny NannyToShow = Nannys_DataGrid.SelectedItem as Nanny; NannyCard nannyCard = new NannyCard(NannyToShow, Nannys_DataGrid); nannyCard.ShowDialog(); }
private void Show_Nanny_Card_Button_Click(object sender, RoutedEventArgs e) { //Show_Nanny_Card Nanny nanny; if (Nannies_Fit_Mom_DataGrid.SelectedItem is Nanny) { nanny = Nannies_Fit_Mom_DataGrid.SelectedItem as Nanny; } else { nanny = BlTools.GetNanny((Nannies_Fit_Mom_DataGrid.SelectedItem as NannyWithDis).NannyId); } NannyCard nannyCard = new NannyCard(nanny, dataGridToRefresh); nannyCard.Show(); }