예제 #1
0
        private List <ActivoBEL> ObtenerListaDeActivos(ClienteBEL cliente)
        {
            var  datos = new Datos();
            bool resultado;

            Hashtable parametros = ObtenerParametros(cliente);

            parametros.Add("@operacion", 6);

            DataSet ds = datos.Leer(ProcedimientoAlmacenado, parametros);

            List <ActivoBEL> _lista = new List <ActivoBEL>();
            ActivoBEL        x;
            ActivoDAL        activoDAL = new ActivoDAL();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                x = activoDAL.GetById(Convert.ToInt32(dr[1]));
                _lista.Add(x);
            }
            return(_lista);
        }
예제 #2
0
        private List <ActivoBEL> ObtenerListaActivos(DonacionBEL donacion)
        {
            var datos = new Datos();

            Hashtable parametros = ObtenerParametros(donacion);

            parametros.Add("@operacion", 8);
            DataSet ds = datos.Leer(ProcedimientoAlmacenado, parametros);

            List <ActivoBEL> _lista    = new List <ActivoBEL>();
            ActivoDAL        activoDAL = new ActivoDAL();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                _lista.Add((ActivoBEL)activoDAL.ObtenerUno(new ActivoBEL()
                {
                    Id = (int)dr[1]
                }));
            }

            return(_lista);
        }