private void btnEditar_Click(object sender, RoutedEventArgs e) { if (rbCajas.IsChecked == true) { modCaja frm = new modCaja(); frm.borde = borde; frm.anterior = this.anterior; frm.modificar = true; frm.id = Convert.ToInt16(gvResultados.SelectedValue.ToString()); borde.Child = frm; } if (rbSalas.IsChecked == true) { modSala frm = new modSala(); frm.borde = borde; frm.anterior = this.anterior; frm.modificar = true; borde.Child = frm; frm.DataContext = gvResultados.SelectedItem; } if (rbVitrinas.IsChecked == true) { modVitrina frm = new modVitrina(); frm.borde = borde; frm.anterior = this.anterior; frm.modificar = true; frm.id = Convert.ToInt16(gvResultados.SelectedValue.ToString()); borde.Child = frm; } }
private void btnNuevaVitrina_Click(object sender, RoutedEventArgs e) { modVitrina frm = new modVitrina(); frm.borde = borde; frm.anterior = this; borde.Child = frm; }
private void btnEditarVitrina_Click(object sender, RoutedEventArgs e) { if (gvVitrinas.SelectedItem != null) { modVitrina frm = new modVitrina(); frm.borde = borde; frm.anterior = this; frm.modificar = true; frm.id = Convert.ToInt16(gvVitrinas.SelectedValue.ToString()); borde.Child = frm; } else { MessageBox.Show("Debe seleccionar una vitrina para editar", "Advertencia"); } }