string GetRegion(HttpContext context, ref bool result) { string msg = ""; string type = context.Request["type"]; switch (type) { case "1": msg = Newtonsoft.Json.JavaScriptConvert.SerializeObject(Areas.GetDistinctAreas()); result = true; break; case "2": msg = Newtonsoft.Json.JavaScriptConvert.SerializeObject(Areas.GetAllChildAreas(int.Parse(context.Request["areaId"]))); result = true; break; } return(msg); }