private void InterpretesForm_Load(object sender, EventArgs e) { try { servicio = new ServicioInterprete(); lista = servicio.GetInterpretes(); MostrarDatosEnGrilla(); } catch (Exception exception) { Helper.MensajeBox(exception.Message, Tipo.Error); } }
public static void CargarDatosComboInterpretes(ref ComboBox comboInterprete) { ServicioInterprete servicio = new ServicioInterprete(); var lista = servicio.GetInterpretes(); Interprete interpreteDefault = new Interprete(); interpreteDefault.InterpreteId = 0; interpreteDefault.Nombre = "<Seleccionar Interprete>"; lista.Insert(0, interpreteDefault); comboInterprete.DataSource = lista; comboInterprete.DisplayMember = "Nombre"; comboInterprete.ValueMember = "InterpreteId"; comboInterprete.SelectedIndex = 0; }
private void InterpretesForm_Load(object sender, EventArgs e) { try { servicio = new ServicioInterprete(); lista = servicio.GetInterpretes(); MostrarDatosEnGrilla(); } catch (Exception exception) { MessageBox.Show(exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static void CargarDatosComboInterpretes(ref ComboBox combo) { ServicioInterprete servicio = new ServicioInterprete(); var lista = servicio.GetInterpretes(); Interprete defaultInterprete = new Interprete() { InterpreteId = 0, Nombre = "<Seleccione Interprete>" }; lista.Insert(0, defaultInterprete); combo.DataSource = lista; combo.DisplayMember = "Nombre"; combo.ValueMember = "InterpreteId"; combo.SelectedIndex = 0; }