示例#1
0
 public override void fillLst(IDbTransaction trans = null)
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Bodega");
         addParameters(0);
         if (trans == null)
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm);
         }
         else
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm, trans);
         }
         this._lst = new List <Bodega>();
         foreach (DataRow dr in dt.Rows)
         {
             Bodega o = new Bodega();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
示例#2
0
 protected void BindByDataRow(DataRow dr, Bodega o)
 {
     try
     {
         int.TryParse(dr["id"].ToString(), out entero);
         o.Id   = entero;
         entero = 0;
         int.TryParse(dr["id"].ToString(), out entero);
         o.Id        = entero;
         entero      = 0;
         o.Nombre    = dr["nombre"].ToString();
         o.Direccion = dr["direccion"].ToString();
         if (dr["IsActive"] != DBNull.Value)
         {
             bool.TryParse(dr["IsActive"].ToString(), out logica);
             o.IsActive = logica;
             logica     = false;
         }
     }
     catch
     {
         throw;
     }
 }
示例#3
0
 public BodegaMng()
 {
     this._oBodega = new Bodega();
     this._lst     = new List <Bodega>();
 }