/// <summary> /// Fill countries by name /// </summary> /// <param name="name_startsWith"></param> /// <returns></returns> public JsonResult GetCountry(string name_startsWith) { LocationModel obj = new LocationModel(); var keyValues = obj.GetCountryByText(name_startsWith); if (keyValues.Count > 0) { return(Json(new { result = keyValues }, JsonRequestBehavior.AllowGet)); } return(Json(new { result = "ok" }, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Fill countries by name /// </summary> /// <param name="name_startsWith"></param> /// <returns></returns> public JsonResult GetCountry(string name_startsWith) { Ctx ctx = new Ctx(); if (Session["Ctx"] != null) { ctx = Session["ctx"] as Ctx; } LocationModel obj = new LocationModel(); var keyValues = obj.GetCountryByText(name_startsWith, ctx); if (keyValues.Count > 0) { return(Json(new { result = keyValues }, JsonRequestBehavior.AllowGet)); } return(Json(new { result = "ok" }, JsonRequestBehavior.AllowGet)); }