Ejemplo n.º 1
0
        public IEnumerable <object> GetUniversityList(int listCount)
        {
            try
            {
                var re = UniversityServer.GetUniversityList(listCount);

                return(re);
            }
            catch (Exception e)
            {
                return(new[] { e.Message });
            }
        }
Ejemplo n.º 2
0
        public IEnumerable <object> GetUniversityList(int listCount)
        {
            try
            {
                var addr = Server.GetUserIp(Request.HttpContext);
                if (Server.IPHandle(addr) == 0)
                {
                    return(new[] { "your ip can't using our api , please contact administrator" });
                }

                var re = UniversityServer.GetUniversityList(listCount);

                return(re);
            }
            catch (Exception e)
            {
                return(new[] { e.Message });
            }
        }