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