public IActionResult Update(GetAdPlaceDetailDto dto) { var getAdPlaceResult = _adService.GetAdPlaceDetail(dto); if (getAdPlaceResult.Code > 0) { return(Json(getAdPlaceResult)); } var model = new UpdateModel() { AdPlace = getAdPlaceResult.Data }; return(View("~/Administration/Views/AdPlace/Update.cshtml", model)); }
/// <summary> /// 获取详细 /// </summary> /// <param name="dto"></param> /// <returns></returns> public PublicResult <GetAdPlaceDetailInfo> GetAdPlaceDetail(GetAdPlaceDetailDto dto) { using (var client = DbFactory.CreateClient()) { var adPlace = client.Queryable <AdPlace>().InSingle(dto.Id); if (adPlace == null) { return(Error("找不到此信息")); } var resp = new GetAdPlaceDetailInfo { Id = adPlace.Id, Title = adPlace.Title, Code = adPlace.Code, Desc = adPlace.Desc, AddTime = adPlace.Addtime }; return(resp); } }