Example #1
0
        private void CargarSectorRequerimiento()
        {
            try
            {
                BLL.Tables.COMSECTORREQUERIMIENTO _sector = new BLL.Tables.COMSECTORREQUERIMIENTO();
                _sector.ItemList();
                Entities.Tables.COMSECTORREQUERIMIENTO _itemSeleccion = new Entities.Tables.COMSECTORREQUERIMIENTO();
                //Limpia el combo
                this.comboBoxSector.SuspendLayout();
                this.comboBoxSector.DataSource = null;
                this.comboBoxSector.Items.Clear();

                //Carga el item de Seleccion.-
                _itemSeleccion.DESCRIPCION            = "<Seleccione un Sector>";
                _itemSeleccion.SECTORREQUERIMIENTO_ID = 0;
                _sector.Result.Insert(0, _itemSeleccion);

                //Carga el combo
                this.comboBoxSector.ValueMember   = "SECTORREQUERIMIENTO_ID";
                this.comboBoxSector.DisplayMember = "DESCRIPCION";
                this.comboBoxSector.DataSource    = _sector.Result;
                this.comboBoxSector.SelectedValue = 0;
                this.comboBoxSector.ResumeLayout();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        //FIN PERMISOS

        private void CargarSectores()
        {
            try
            {
                BLL.Tables.COMSECTORREQUERIMIENTO _sector = new BLL.Tables.COMSECTORREQUERIMIENTO();
                _sector.OrderByParameter.Add(DAL.Tables.COMSECTORREQUERIMIENTO.ColumnEnum.Descripcion);
                this.bindingSourceSectores.DataSource = _sector.ItemList();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }