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