public HttpResponse getfeaturedjobsbyprogram(string zip, string programid) { try { string ipaddress = ""; #if DEBUG ipaddress = RandomHelper.Instance.Next(1, 256) + "." + RandomHelper.Instance.Next(0, 256) + "." + RandomHelper.Instance.Next(0, 256) + "." + RandomHelper.Instance.Next(1, 256); #else ipaddress = Request.UserHostAddress; #endif DirectEmployerSearchEngine engine = new DirectEmployerSearchEngine(); Response.ContentType = "application/json"; Response.Write("{\"result\": \"ok\", \"results\": " + engine.FindPositions(Request, zip, "", "", "", programid).ToJSON() + " }"); Response.End(); } catch (Exception ex) { Response.ContentType = "application/json"; Response.Write(DefaultErrorResponse(ex.Message)); Response.End(); } return(null); }
public HttpResponse matchjobs(string zip, string a, string t, string limit, string start, string g) { try { if (g == null) { g = ""; } if (limit == null) { limit = "10"; } if (start == null) { start = "0"; } string ipaddress = ""; #if DEBUG ipaddress = RandomHelper.Instance.Next(1, 256) + "." + RandomHelper.Instance.Next(0, 256) + "." + RandomHelper.Instance.Next(0, 256) + "." + RandomHelper.Instance.Next(1, 256); #else ipaddress = Request.UserHostAddress; #endif DirectEmployerSearchEngine engine = new DirectEmployerSearchEngine(); Response.ContentType = "application/json"; Response.Write("{\"result\": \"ok\", \"results\": " + engine.FindPositions(Request, zip, a, t, g, "").ToJSON() + " }"); Response.End(); } catch (Exception ex) { Response.ContentType = "application/json"; Response.Write(DefaultErrorResponse(ex.Message)); Response.End(); } return(null); }