Beispiel #1
0
 protected void BindByDataRow(DataRow dr, Bodega_zona 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;
         if (dr["id_bodega"] != DBNull.Value)
         {
             int.TryParse(dr["id_bodega"].ToString(), out entero);
             o.Id_bodega = entero;
             entero      = 0;
         }
         o.Clave  = dr["clave"].ToString();
         o.Nombre = dr["nombre"].ToString();
         if (dr["IsActive"] != DBNull.Value)
         {
             bool.TryParse(dr["IsActive"].ToString(), out logica);
             o.IsActive = logica;
             logica     = false;
         }
     }
     catch
     {
         throw;
     }
 }
Beispiel #2
0
 public override void fillLst(IDbTransaction trans = null)
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Bodega_zona");
         addParameters(0);
         if (trans == null)
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm);
         }
         else
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm, trans);
         }
         this._lst = new List <Bodega_zona>();
         foreach (DataRow dr in dt.Rows)
         {
             Bodega_zona o = new Bodega_zona();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
Beispiel #3
0
 public Bodega_zonaMng()
 {
     this._oBodega_zona = new Bodega_zona();
     this._lst          = new List <Bodega_zona>();
 }