public ActionResult Edit(long id) { var shopBranch = ShopBranchApplication.GetShopBranchById(id); #region 初始化门店配送范围 QueryPageModel <DeliveryScope> scopeList = ShopBranchApplication.GetShopDeliveryScope(new ShopDeliveryScopeQuery() { ShopBranchId = shopBranch.Id }); string regionIdList = "", regionNameList = ""; foreach (DeliveryScope scopeInfo in scopeList.Models) { regionIdList += scopeInfo.RegionId + ","; regionNameList += scopeInfo.RegionName + ","; } ViewBag.RegionIdList = regionIdList.TrimEnd(','); ViewBag.RegionNameList = regionNameList.TrimEnd(','); #endregion return(View(shopBranch)); }