예제 #1
0
파일: FolioMng.cs 프로젝트: comparan77/4CAD
 public override void fillLst(IDbTransaction trans = null)
 {
     try
     {
         this.comm = GenericDataAccess.CreateCommandSP("sp_Folio");
         addParameters(0);
         if (trans == null)
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm);
         }
         else
         {
             this.dt = GenericDataAccess.ExecuteSelectCommand(comm, trans);
         }
         this._lst = new List <Folio>();
         foreach (DataRow dr in dt.Rows)
         {
             Folio o = new Folio();
             BindByDataRow(dr, o);
             this._lst.Add(o);
         }
     }
     catch
     {
         throw;
     }
 }
예제 #2
0
파일: FolioMng.cs 프로젝트: comparan77/4CAD
 protected void BindByDataRow(DataRow dr, Folio o)
 {
     try
     {
         int.TryParse(dr["id"].ToString(), out entero);
         o.Id   = entero;
         entero = 0;
         o.Tipo = dr["tipo"].ToString();
         if (dr["anio_actual"] != DBNull.Value)
         {
             int.TryParse(dr["anio_actual"].ToString(), out entero);
             o.Anio_actual = entero;
             entero        = 0;
         }
         if (dr["actual"] != DBNull.Value)
         {
             int.TryParse(dr["actual"].ToString(), out entero);
             o.Actual = entero;
             entero   = 0;
         }
         if (dr["digitos"] != DBNull.Value)
         {
             int.TryParse(dr["digitos"].ToString(), out entero);
             o.Digitos = entero;
             entero    = 0;
         }
         if (dr["folio_inicial"] != DBNull.Value)
         {
             int.TryParse(dr["folio_inicial"].ToString(), out entero);
             o.Folio_inicial = entero;
             entero          = 0;
         }
         //if (dr["IsActive"] != DBNull.Value)
         //{
         //    bool.TryParse(dr["IsActive"].ToString(), out logica);
         //    o.IsActive = logica;
         //    logica = false;
         //}
     }
     catch
     {
         throw;
     }
 }
예제 #3
0
파일: FolioMng.cs 프로젝트: comparan77/4CAD
 public FolioMng()
 {
     this._oFolio = new Folio();
     this._lst    = new List <Folio>();
 }