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 btnNuevaCaja_Click(object sender, RoutedEventArgs e) { modCaja frm = new modCaja(); frm.borde = borde; frm.anterior = this; borde.Child = frm; }
private void btnEditarCaja_Click(object sender, RoutedEventArgs e) { if (gvCajas.SelectedItem != null) { modCaja frm = new modCaja(); frm.borde = borde; frm.anterior = this; frm.modificar = true; frm.id = Convert.ToInt16(gvCajas.SelectedValue.ToString()); borde.Child = frm; } else { MessageBox.Show("Debe seleccionar una caja para editar", "Advertencia"); } }