private void CargarCboEstados() { try { BLL.Tables.EST_LABORATORIOESTADOS _os = new BLL.Tables.EST_LABORATORIOESTADOS(); Entities.Tables.EST_LABORATORIOESTADOS _itemSeleccion = new Entities.Tables.EST_LABORATORIOESTADOS(); List <Entities.Tables.EST_LABORATORIOESTADOS> _ItemsOS = new List <Entities.Tables.EST_LABORATORIOESTADOS>(); //Limpia el combo this.cboEstado.SuspendLayout(); this.cboEstado.DataSource = null; this.cboEstado.Items.Clear(); //Carga el item de Seleccion _itemSeleccion.DESCRIPCIONESTADO = "<Seleccione>"; _itemSeleccion.ESTADO_ID = 0; _ItemsOS = _os.ItemList(); //Carga la lista para llenar el combo; _ItemsOS.Insert(0, _itemSeleccion); //Carga el combo this.cboEstado.DisplayMember = BLL.Tables.EST_LABORATORIOESTADOS.ColumnNames.DESCRIPCIONESTADO; this.cboEstado.ValueMember = BLL.Tables.EST_LABORATORIOESTADOS.ColumnNames.ESTADO_ID; this.cboEstado.DataSource = _ItemsOS; this.cboEstado.ResumeLayout(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void CargarEstados(DataGridViewComboBoxCell comboboxColumnSector) { try { BLL.Tables.EST_LABORATORIOESTADOS _est = new BLL.Tables.EST_LABORATORIOESTADOS(); Entities.Tables.EST_LABORATORIOESTADOS _itemSeleccion = new Entities.Tables.EST_LABORATORIOESTADOS(); List <Entities.Tables.EST_LABORATORIOESTADOS> _miMarca = new List <Entities.Tables.EST_LABORATORIOESTADOS>(); comboboxColumnSector.DataSource = null; comboboxColumnSector.Items.Clear(); //Carga el item de Seleccion _itemSeleccion.DESCRIPCIONESTADO = "<Sin Definir>";// (_miMarca.Count > 0) ? "<Seleccione una Marca>" : "<Sin Definir>"; _itemSeleccion.ESTADO_ID = 0; _miMarca = _est.ItemList(); _miMarca.Insert(0, _itemSeleccion); //Carga el combo comboboxColumnSector.DisplayMember = BLL.Tables.EST_LABORATORIOESTADOS.ColumnNames.DESCRIPCIONESTADO; comboboxColumnSector.ValueMember = BLL.Tables.EST_LABORATORIOESTADOS.ColumnNames.ESTADO_ID; comboboxColumnSector.DataSource = _miMarca.ToArray(); //FIN CARGO COMBO TIPO RECLAMO } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }