private void cargarCbPersonas() { PersonaNegocio pn = new PersonaNegocio(); cbPersonas.DataSource = pn.GetAll(); cbPersonas.DisplayMember = "NombreApe"; cbPersonas.ValueMember = "Id"; }
public void Listar() { PersonaNegocio pn = new PersonaNegocio(); this.dgvPersonas.DataSource = pn.GetAll(); }
public void CargaDropDownList() { PersonaNegocio pn = new PersonaNegocio(); this.PersonaDropDownList.DataSource = pn.GetAll(); this.PersonaDropDownList.DataValueField = "Id"; this.PersonaDropDownList.DataTextField = "NombreApe"; this.PersonaDropDownList.DataBind(); this.PersonaDropDownList.Items.Insert(0, new ListItem("Seleccione su nombre y apellido", "0")); }