private void Button_Click_2(object sender, RoutedEventArgs e) { WelcomePage frm = new WelcomePage(); modUsuario usr = new modUsuario() { anterior = frm, borde = bdrContenedor, modificar = true, userName = Settings.user.username }; usr.DataContext = DataContext; bdrContenedor.Child = usr; }
private void btnEditarUsuario_Click(object sender, RoutedEventArgs e) { if (gvActivos.SelectedItem == null) { modNuevoU frm = new modNuevoU(); frm.ShowDialog(); } else { modUsuario frm = new modUsuario(); frm.borde = borde; frm.anterior = this; frm.modificar = true; borde.Child = frm; frm.DataContext = gvActivos.SelectedItem; } }
private void btnEditar_Click(object sender, RoutedEventArgs e) { if (rbAutores.IsChecked == true) { modAutor frm = new modAutor(); frm.borde = borde; frm.anterior = this; frm.modificar = true; frm.id = Convert.ToInt16(gvResultados.SelectedValue.ToString()); borde.Child = frm; } else { modUsuario frm = new modUsuario(); frm.borde = borde; frm.anterior = this; frm.modificar = true; borde.Child = frm; frm.DataContext = gvResultados.SelectedItem; } }