private void Historal_Click(object sender, RoutedEventArgs e) { HistorialView addFactura = new HistorialView(); ModifyTransporteViewModel viewModel = this.ConvertDataContext(this.DataContext); addFactura.DataContext = viewModel.CreateHistorialViewModel(); addFactura.ShowDialog(); }
private ModifyTransporteViewModel ConvertDataContext(object dataSource) { ModifyTransporteViewModel viewModel = dataSource as ModifyTransporteViewModel; return(viewModel); }