Exemplo n.º 1
0
        public static SoportesForm GetInstancia(IServicioSoporte servicio)
        {
            if (instancia == null)
            {
                instancia             = new SoportesForm(servicio);
                instancia.FormClosed += form_Close;
            }

            return(instancia);
        }
Exemplo n.º 2
0
        public static void CargarDatosComboSoportes(ref ComboBox combo)
        {
            IServicioSoporte servicio = DI.Create <IServicioSoporte>();
            var     lista             = servicio.GetLista();
            Soporte defaultSoporte    = new Soporte()
            {
                SoporteId = 0, Descripcion = "<Seleccione Soporte>"
            };

            lista.Insert(0, defaultSoporte);
            combo.DataSource    = lista;
            combo.DisplayMember = "Descripcion";
            combo.ValueMember   = "SoporteId";
            combo.SelectedIndex = 0;
        }
Exemplo n.º 3
0
 private SoportesForm(IServicioSoporte servicio)
 {
     InitializeComponent();
     this.servicio = servicio;
 }