public override void fillLst() { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Pivote"); addParameters(0); this.dt = GenericDataAccess.ExecuteSelectCommand(comm); this._lst = new List <Pivote>(); foreach (DataRow dr in dt.Rows) { Pivote o = new Pivote(); BindByDataRow(dr, o); this._lst.Add(o); } } catch { throw; } }
protected void BindByDataRow(DataRow dr, Pivote o) { try { int.TryParse(dr["id"].ToString(), out entero); o.Id = entero; entero = 0; o.Campo = dr["campo"].ToString(); o.Tipo = dr["tipo"].ToString(); o.Campoxls = dr["campoxls"].ToString(); if (dr["requerido"] != DBNull.Value) { bool.TryParse(dr["requerido"].ToString(), out logica); o.Requerido = logica; logica = false; } o.Campotbl = dr["campotbl"].ToString(); } catch { throw; } }
public PivoteMng() { this._oPivote = new Pivote(); this._lst = new List <Pivote>(); }