public override void fillLst(IDbTransaction trans = null) { try { this.comm = GenericDataAccess.CreateCommandSP("sp_Servicio_periodo"); addParameters(0); if (trans == null) { this.dt = GenericDataAccess.ExecuteSelectCommand(comm); } else { this.dt = GenericDataAccess.ExecuteSelectCommand(comm, trans); } this._lst = new List <Servicio_periodo>(); foreach (DataRow dr in dt.Rows) { Servicio_periodo o = new Servicio_periodo(); BindByDataRow(dr, o); this._lst.Add(o); } } catch { throw; } }
protected void BindByDataRow(DataRow dr, Servicio_periodo o) { try { int.TryParse(dr["id"].ToString(), out entero); o.Id = entero; entero = 0; o.Nombre = dr["nombre"].ToString(); } catch { throw; } }
public Servicio_periodoMng() { this._oServicio_periodo = new Servicio_periodo(); this._lst = new List <Servicio_periodo>(); }