Beispiel #1
0
        private void CargarGrid()
        {
            List <Empresa> listaempresa = empresaServicio.TraerEmpresas();

            gridEmpresas.Visible    = true;
            gridEmpresas.DataSource = listaempresa;
        }
Beispiel #2
0
        void CargarEmpresas()
        {
            try
            {
                EmpresaServicio empresaServicio = new EmpresaServicio();
                List <Empresa>  listaempresa    = empresaServicio.TraerEmpresas();

                this.empresasCombo.DataSource    = listaempresa;
                this.empresasCombo.DisplayMember = "RazonSocial";
                this.empresasCombo.ValueMember   = "Id";
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ha ocurrido un error al cargar las empresas");
                this.Close();
            }
        }