public void getGasolinero() { //Variables DataTable dt = new DataTable(); BindingSource bs = new BindingSource(); List <clsGasolinero> ListadeClase = new List <clsGasolinero>(); clsGasolinero c = new clsGasolinero(); //Lenamos el DS de Categorias Params.Clear(); Data.DataModule.ParamByName(Params, "Datos", ""); Data.DataModule.FillDataSet(spCatEstacionDS, "spCatGasolinero", Params.ToArray()); dt = spCatEstacionDS.Tables["spCatGasolinero"]; ListadeClase = c.FillList(dt); bs.DataSource = ListadeClase; this.lueGasolinero.Properties.DataSource = bs.List; this.lueGasolinero.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("GasolineroID", "ID")); this.lueGasolinero.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Descripcion", "Descripcion")); this.lueGasolinero.Properties.DisplayMember = "Descripcion"; this.lueGasolinero.Properties.ValueMember = "GasolineroID"; this.lueGasolinero.Properties.DropDownRows = ListadeClase.Count; }
public void getGasolinero() { //Variables DataTable dt = new DataTable(); BindingSource bs = new BindingSource(); clsGasolinero objGasolinero = new clsGasolinero(); List <clsGasolinero> lstGasolinero = new List <clsGasolinero>(); //Lenamos el DS de Categorias Params.Clear(); Data.DataModule.ParamByName(Params, "Datos", ""); Data.DataModule.FillDataSet(spCatClienteDS1, "spCatGasolinero", Params.ToArray()); dt = spCatClienteDS1.Tables["spCatGasolinero"]; lstGasolinero = objGasolinero.FillList(dt); bs.DataSource = lstGasolinero; lueGasolinero.Properties.DataSource = bs.List; lueGasolinero.Properties.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Descripcion")); lueGasolinero.Properties.DisplayMember = "Descripcion"; lueGasolinero.Properties.ValueMember = "GasolineroID"; lueGasolinero.Properties.DropDownRows = lstGasolinero.Count; }