public JsonResult GetInfo(string ID) { var mql = Sys_CityAreaSet.SelectAll().Where(Sys_CityAreaSet.Id.Equal(ID)); Sys_CityArea Rmodel = DDBiz.GetEntity(mql); // groupsBiz.Add(rol); return(Json(Rmodel, JsonRequestBehavior.AllowGet)); }
public string GetSys_CityArea(HttpContext context) { List <Sys_CityArea> AllList = new List <Sys_CityArea>(); var sql = Sys_CityAreaSet.SelectAll(); AllList = OPBiz.GetOwnList <Sys_CityArea>(sql); return(JsonHelper.ToJson(AllList, true)); }
/// <summary> /// 获取所有的市 /// </summary> /// <param name="context"></param> /// <param name="httpObject"></param> /// <param name="resultMode"></param> private void GetCity(HttpContext context, JObject httpObject, HttpReSultMode resultMode) { var mql = Sys_CityAreaSet.SelectAll().Where(Sys_CityAreaSet.AreaTypes.Equal(1)); List <Sys_CityArea> list = OPBiz.GetOwnList(mql); if (list != null && list.Count > 0) { resultMode.Code = 11; resultMode.Msg = "获取成功"; resultMode.Data = JsonHelper.ToJson(list, true); } else { resultMode.Code = 0; resultMode.Msg = "没有数据"; resultMode.Data = "[]"; } context.Response.Write(JsonHelper.ToJson(resultMode, true)); context.Response.End(); }
/// <summary> /// 根据市获取所有的区 /// </summary> /// <param name="context"></param> /// <param name="httpObject"></param> /// <param name="resultMode"></param> private void GetAreaByC(HttpContext context, JObject httpObject, HttpReSultMode resultMode) { string pId = httpObject["jsonEntity"]["cid"].ToString(); var mql = Sys_CityAreaSet.SelectAll().Where(Sys_CityAreaSet.ParentId.Equal(pId)); List <Sys_CityArea> list = OPBiz.GetOwnList <Sys_CityArea>(mql); if (list != null && list.Count > 0) { resultMode.Code = 11; resultMode.Msg = "获取成功"; resultMode.Data = JsonHelper.ToJson(list, true); } else { resultMode.Code = 0; resultMode.Msg = "没有数据"; resultMode.Data = "[]"; } context.Response.Write(JsonHelper.ToJson(resultMode, true)); context.Response.End(); }