public void LlenarCampos(int id) { this.Id = id; Personas personas = new Personas(); personas = PersonasBll.Buscar(id); IdNumericUpDown1.Value = personas.PersonaID; textNombre.Text = personas.Nombre; textCedula.Text = personas.Cedula; textDireccion.Text = personas.Direccion; textTelefono.Text = personas.Telefono; }
private void BuscarButton_Click(object sender, RoutedEventArgs e) { int id; int.TryParse(IdTextBox.Text, out id); Personas p = PersonasBll.Buscar(id); if (p != null) { Limpiar(); LlenaCampos(p); } else { MessageBox.Show("No Encontrado", "ERROR"); } }
private void BuscarButton_Click(object sender, RoutedEventArgs e) { int id; Personas persona = new Personas(); int.TryParse(PersonaIdtextBox.Text, out id); Limpiar(); persona = PersonasBll.Buscar(id); if (persona != null) { LlenaCampos(persona); } else { MessageBox.Show("NO SE ENCUENTRA LA PERSONA"); } }
private void BuscarButton_Click(object sender, RoutedEventArgs e) { int id; Personas persona = new Personas(); int.TryParse(IDTextBox.Text, out id); Limpiar(); persona = PersonasBll.Buscar(id); if (persona != null) { LlenaCampos(persona); } else { MessageBox.Show("Persona no Encontrada"); } }
private void Buscar_Click(object sender, EventArgs e) { int id; Personas personas = new Personas(); int.TryParse(IdNumericUpDown1.Text, out id); Limpiar(); personas = PersonasBll.Buscar(id); if (personas != null) { MessageBox.Show("Persona Encotrada"); LlenaCampo(personas); } else { MessageBox.Show("Persona no Encontrada"); } }
private bool Existe() { Personas persona = PersonasBll.Buscar(Convert.ToInt32(PersonaIdtextBox.Text)); return(persona != null); }
private bool ExisteEnLaBaseDeDatos() { Personas persona = PersonasBll.Buscar((int)IDNumericUpDown.Value); return(persona != null); }
private bool ExisteEnLaBaseDeDatos() { Personas p = PersonasBll.Buscar((int)Convert.ToInt32(IdTextBox.Text)); return(p != null); }
private bool ExisteEnLaBaseDeDatos() { Personas personas = PersonasBll.Buscar(Id); return(personas != null); }