Ejemplo n.º 1
0
        public IEnumerable <object> QueryProfession([FromBody] QProNameParModel qpnpm)
        {
            try
            {
                var account       = HttpContext.Session.GetString("user_Account");
                var localProvince = HttpContext.Session.GetString("user_Province");

                if (account == null || localProvince == null)
                {
                    return(new[]
                    {
                        new { msg = "not login" }
                    });
                }

                if (Server.AccountHandle(account) == 0)
                {
                    return(new[]
                    {
                        new { msg = "times exceeded" }
                    });
                }

                var re = NewHistoryDataQueryServer.QueryProfession(qpnpm, localProvince);

                return(re);
            }
            catch (Exception e)
            {
                return(new[] { e.Message });
            }
        }
Ejemplo n.º 2
0
        public IEnumerable <object> AllUniBatch()
        {
            try
            {
                var account = HttpContext.Session.GetString("user_Account");

                if (account == null)
                {
                    return(new[]
                    {
                        new { msg = "not login" }
                    });
                }

                if (Server.AccountHandle(account) == 0)
                {
                    return(new[]
                    {
                        new { msg = "times exceeded" }
                    });
                }
                var re = NewHistoryDataQueryServer.AllUniBatch();

                return(re);
            }
            catch (Exception e)
            {
                return(new[] { e.Message });
            }
        }
Ejemplo n.º 3
0
        public IEnumerable <object> QueryScore([FromBody] QScoreParModel qspm, string localProvince)
        {
            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 = NewHistoryDataQueryServer.QueryScore(qspm, localProvince);

                return(re);
            }
            catch (Exception e)
            {
                return(new[] { e.Message });
            }
        }
Ejemplo n.º 4
0
        public IEnumerable <object> AllUniBatch()
        {
            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 = NewHistoryDataQueryServer.AllUniBatch();

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