public IEnumerable <object> UniversityListByProfession(string proName) { 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 = HistoryDataServer.UniversityListByProfession(localProvince, proName); return(re); } catch (Exception e) { return(new[] { e.Message }); } }
public IEnumerable <object> UniversityListByProfession(string localProvince, string proName) { 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 = HistoryDataServer.UniversityListByProfession(localProvince, proName); return(re); } catch (Exception e) { return(new[] { e.Message }); } }