Ejemplo n.º 1
0
 protected void BindByDataRow(DataRow dr, Cortina o)
 {
     try
     {
         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.Nombre = dr["nombre"].ToString();
         if (dr["IsActive"] != DBNull.Value)
         {
             bool.TryParse(dr["IsActive"].ToString(), out logica);
             o.IsActive = logica;
             logica     = false;
         }
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 2
0
 public override void fillLst(IDbTransaction trans = null)
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Cortina");
         addParameters(0);
         if (trans == null)
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm);
         }
         else
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm, trans);
         }
         this._lst = new List <Cortina>();
         foreach (DataRow dr in dt.Rows)
         {
             Cortina o = new Cortina();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 3
0
 public CortinaMng()
 {
     this._oCortina = new Cortina();
     this._lst      = new List <Cortina>();
 }