public void mnEditarCliente(object sender, RoutedEventArgs e) { editarCliente edClie = new editarCliente(); edClie.Owner = this; edClie.ShowDialog(); }
private void dataGridUsuarios_SelectionChanged(object sender, SelectionChangedEventArgs e) { int index = (dataGridUsuarios.SelectedIndex) + 1; int largoDG = dataGridUsuarios.Items.Count; if (index > Largo) { MessageBox.Show("No se puede mostrar datos de una fila vacia", "Advertencia!", MessageBoxButton.OK, MessageBoxImage.Exclamation); } else { Cliente objCli = dataGridUsuarios.SelectedItem as Cliente; string nom = objCli.Nombre; string ap = objCli.Apellido; string rut = objCli.Rut; string sexo = objCli.Sexo; string estC = objCli.EstadoCivil; string fecN = objCli.FechaNacimiento; editarCliente edCli = new editarCliente(nom, ap, rut, sexo, estC, fecN); this.Hide(); edCli.Owner = this; edCli.Show(); } }