Example #1
0
 private void EstilosForm_Load(object sender, EventArgs e)
 {
     Dock = DockStyle.Fill;
     try
     {
         servicio = new ServicioEstilo();
         lista    = servicio.GetLista();
         MostrarDatosEnGrilla();
     }
     catch (Exception exception)
     {
         Helper.MensajeBox(exception.Message, Tipo.Error);
     }
 }
Example #2
0
        public static void CargarDatosComboEstilo(ref ComboBox comboEstilo)
        {
            ServicioEstilo servicio      = new ServicioEstilo();
            var            lista         = servicio.GetLista();
            Estilo         estiloDefault = new Estilo();

            estiloDefault.EstiloId = 0;
            estiloDefault.Nombre   = "<Seleccionar Estilo>";
            lista.Insert(0, estiloDefault);
            comboEstilo.DataSource    = lista;
            comboEstilo.DisplayMember = "Nombre";
            comboEstilo.ValueMember   = "EstiloId";
            comboEstilo.SelectedIndex = 0;
        }
Example #3
0
        public static void CargarDatosComboEstilos(ref ComboBox combo)
        {
            ServicioEstilo servicio      = new ServicioEstilo();
            var            lista         = servicio.GetLista();
            Estilo         defaultEstilo = new Estilo()
            {
                EstiloId = 0, Nombre = "<Seleccione Estilo>"
            };

            lista.Insert(0, defaultEstilo);
            combo.DataSource    = lista;
            combo.DisplayMember = "Nombre";
            combo.ValueMember   = "EstiloId";
            combo.SelectedIndex = 0;
        }
Example #4
0
 private void EstilosForm_Load(object sender, EventArgs e)
 {
     Dock = DockStyle.Fill;
     try
     {
         servicio = new ServicioEstilo();
         lista    = servicio.GetLista();
         MostrarDatosEnGrilla();
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, "Error",
                         MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
 }