Esempio n. 1
0
 public override void fillLst(IDbTransaction trans = null)
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Asn_partida");
         addParameters(0);
         if (trans == null)
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm);
         }
         else
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm, trans);
         }
         this._lst = new List <Asn_partida>();
         foreach (DataRow dr in dt.Rows)
         {
             Asn_partida o = new Asn_partida();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
Esempio n. 2
0
 protected void BindByDataRow(DataRow dr, Asn_partida o)
 {
     try
     {
         int.TryParse(dr["id"].ToString(), out entero);
         o.Id   = entero;
         entero = 0;
         if (dr["id_asn"] != DBNull.Value)
         {
             int.TryParse(dr["id_asn"].ToString(), out entero);
             o.Id_asn = entero;
             entero   = 0;
         }
         o.Sku = dr["sku"].ToString();
         if (dr["tarima"] != DBNull.Value)
         {
             int.TryParse(dr["tarima"].ToString(), out entero);
             o.Tarima = entero;
             entero   = 0;
         }
         if (dr["caja"] != DBNull.Value)
         {
             int.TryParse(dr["caja"].ToString(), out entero);
             o.Caja = entero;
             entero = 0;
         }
         if (dr["pieza"] != DBNull.Value)
         {
             int.TryParse(dr["pieza"].ToString(), out entero);
             o.Pieza = entero;
             entero  = 0;
         }
     }
     catch
     {
         throw;
     }
 }
Esempio n. 3
0
 public Asn_partidaMng()
 {
     this._oAsn_partida = new Asn_partida();
     this._lst          = new List <Asn_partida>();
 }