private void dtGridMoneda_MouseDoubleClick(object sender, MouseButtonEventArgs e) { DlgModifyReciboView dlg = new DlgModifyReciboView(); CatalogReciboViewModel viewModel = this.ConvertDataContext(this.DataContext); dlg.DataContext = viewModel.CreateModifyReciboViewModel(); dlg.ShowDialog(); }
private void btnNuevo_Click(object sender, RoutedEventArgs e) { DlgAddReciboView dlg = new DlgAddReciboView(); CatalogReciboViewModel viewModel = this.ConvertDataContext(this.DataContext); dlg.DataContext = viewModel.CraeteAddReciboViewModel(); dlg.ShowDialog(); }
private CatalogReciboViewModel ConvertDataContext(object dataSource) { CatalogReciboViewModel viewModel = dataSource as CatalogReciboViewModel; return(viewModel); }