private void button8_Click(object sender, RoutedEventArgs e) { FacturaCatalogAgregarItem addFactura = new FacturaCatalogAgregarItem(); ModifyItemViewModel viewModel = this.ConvertDataContext(this.DataContext); addFactura.DataContext = viewModel.CreateModifyFacturaViewModel(); addFactura.ShowDialog(); }
private void button3_Click(object sender, RoutedEventArgs e) { AddFactura addFactura = new AddFactura(); ModifyItemViewModel viewModel = this.DataContext as ModifyItemViewModel; addFactura.DataContext = viewModel.CreateAgregarFacturaViewModel();; addFactura.Show(); }
private void BotonNueva_Click(object sender, RoutedEventArgs e) { checkBox1.IsChecked = false; txtNomreStatus.IsEnabled = true; textBoxGuía.IsEnabled = true; textBox1.IsEnabled = true; button1.IsEnabled = true; BotonNueva.IsEnabled = false; textBlock2.Text = ""; txtNomreStatus.Text = ""; textBox1.Text = ""; ModifyItemViewModel m = new ModifyItemViewModel(); this.DataContext = m; }
public FacturaCatalogAgregarItemViewModel(ModifyItemViewModel modifyItemViewModel) { this._ModifyItemViewModel = modifyItemViewModel; this.ContB = true; this.init(); }
private ModifyItemViewModel ConvertDataContext(object dataSource) { ModifyItemViewModel viewModel = dataSource as ModifyItemViewModel; return(viewModel); }