Пример #1
0
        private void LlenarSeccion()
        {
            this.dataGridViewSeccion.AutoGenerateColumns = false;
            int index = this.dataGridViewSeccion.Columns.Add("Id", "Id");

            this.dataGridViewSeccion.Columns[index].DataPropertyName = "Id";
            this.dataGridViewSeccion.Columns[index].Visible          = false;
            index = this.dataGridViewSeccion.Columns.Add("Codigo", "Codigo");
            this.dataGridViewSeccion.Columns[index].DataPropertyName = "Codigo";
            this.dataGridViewSeccion.Columns[index].Width            = 70;
            index = this.dataGridViewSeccion.Columns.Add("Descripcion", "Descripcion");
            this.dataGridViewSeccion.Columns[index].DataPropertyName = "Descripcion";
            this.dataGridViewSeccion.Columns[index].Width            = 150;
            index = this.dataGridViewSeccion.Columns.Add("Familia", "Familia");
            this.dataGridViewSeccion.Columns[index].DataPropertyName = "Familia";
            this.dataGridViewSeccion.Columns[index].Width            = 150;
            this.bindingSource1.DataSource      = Seccion.GetAll();
            this.dataGridViewSeccion.DataSource = this.bindingSource1;
        }
Пример #2
0
 void CargarSecciones()
 {
     dgvSecciones.DataSource = Seccion.GetAll();
 }