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