public static InterpretesForm GetInstancia(IServicioInterprete servicio) { if (instancia == null) { instancia = new InterpretesForm(servicio); instancia.FormClosed += form_Close; } return(instancia); }
public static void CargarDatosComboInterpretes(ref ComboBox combo) { IServicioInterprete servicio = DI.Create <IServicioInterprete>(); 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; }
private InterpretesForm(IServicioInterprete servicio) { InitializeComponent(); this.servicio = servicio; }