Ejemplo n.º 1
0
        public List <UsersInfo> UsersInfo_Paging(string CurentPage, string PageSize)
        {
            List <DataAccess.UsersInfo> list = new List <DataAccess.UsersInfo>();

            DataAccess.UsersInfo obj = new DataAccess.UsersInfo();
            DbCommand            cmd = db.GetStoredProcCommand("Users_SelectPage", CurentPage, PageSize);

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.UsersInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }
Ejemplo n.º 2
0
        public List <UsersInfo> UsersInfo_GetByAll()
        {
            List <DataAccess.UsersInfo> list = new List <DataAccess.UsersInfo>();

            DataAccess.UsersInfo obj = new DataAccess.UsersInfo();
            DbCommand            cmd = db.GetStoredProcCommand("Users_SelectAll");

            using (IDataReader dr = db.ExecuteReader(cmd))
            {
                while (dr.Read())
                {
                    list.Add(obj.UsersInfoIDataReader(dr));
                }
                dr.Close();
                dr.Dispose();
            }
            return(list);
        }