public object GetAllAdmitLine(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 = AdmitLineServer.GetAllAdmitLine(localProvince); return(re); } catch (Exception e) { return(new[] { e.Message }); } }
public object GetAllAdmitLine() { try { var localProvince = HttpContext.Session.GetString("user_Province"); if (localProvince == null) { return(new[] { new { msg = "not login" } }); } var re = AdmitLineServer.GetAllAdmitLine(localProvince); return(re); } catch (Exception e) { return(new[] { e.Message }); } }