/// <summary> /// 根据类型 Id获取绑定的信息 /// </summary> /// <param name="ID"></param> /// <param name="CType">类型</param> /// <returns></returns> public JsonResult GetBindInfo(string ID, string CType) { var mql = TS_ShopSet.SelectAll().Where(TS_ShopSet.Id.Equal(ID)); switch (CType) { case "1": //店铺 TS_ShopBiz sb = new TS_ShopBiz(); mql = TS_ShopSet.SelectAll().Where(TS_ShopSet.Id.Equal(ID)); TS_Shop Rmodel = sb.GetEntity(mql); return(MyJson(Rmodel, JsonRequestBehavior.AllowGet)); break; case "2": //便民服务 TS_ServiceBiz sb2 = new TS_ServiceBiz(); mql = TS_ServiceSet.SelectAll().Where(TS_ServiceSet.Id.Equal(ID)); TS_Service Rmodel2 = sb2.GetEntity(mql);; return(MyJson(Rmodel2, JsonRequestBehavior.AllowGet)); break; case "3": //维修店 TS_RepairShopBiz sb3 = new TS_RepairShopBiz(); mql = TS_RepairShopSet.SelectAll().Where(TS_RepairShopSet.Id.Equal(ID)); TS_RepairShop Rmodel3 = sb3.GetEntity(mql); return(MyJson(Rmodel3, JsonRequestBehavior.AllowGet)); break; case "4": //便民信息 TS_ServiceNewBiz sb4 = new TS_ServiceNewBiz(); mql = TS_ServiceNewSet.SelectAll().Where(TS_ServiceNewSet.Id.Equal(ID)); TS_ServiceNew Rmodel4 = sb4.GetEntity(mql); return(MyJson(Rmodel4, JsonRequestBehavior.AllowGet)); break; default: return(null); break; } }