/// <summary> /// 二手求购详情首页 /// </summary> /// <param name="id">帖子Id</param> /// <returns>View</returns> public ActionResult Index(int id) { GoodsBuyInfo goods; if (id <= 0) { return(RedirectToAction("PageNotFound", "PageLink")); } else { goods = buyGoods.Get(id); if (goods == null) { return(RedirectToAction("PageNotFound", "PageLink")); } if (User.Identity.IsAuthenticated) { var isFav = favorite.IsFavorite((int)Fx.Entity.ChannelCatagroy.FxGoodsBuy, id, User.Identity.Name); ViewBag.IsFav = isFav; } else { ViewBag.IsFav = false; } } //换物 if (goods.Pictures != null && goods.Pictures.Count > 0) { return(View("IndexWithPicture", goods)); } else { return(View("IndexWithNoPicture", goods)); } }
/// <summary> /// 房屋求购详情首页 /// </summary> /// <param name="id">帖子Id</param> /// <returns>View</returns> public ActionResult Index(int id) { if (id <= 0) { return(RedirectToAction("PageNotFound", "PageLink")); } else { var house = buyHouse.Get(id); if (house == null) { return(RedirectToAction("PageNotFound", "PageLink")); } if (User.Identity.IsAuthenticated) { var isFav = favorite.IsFavorite((int)Fx.Entity.ChannelCatagroy.FxHouseBuy, id, User.Identity.Name); ViewBag.IsFav = isFav; } else { ViewBag.IsFav = false; } return(View(house)); } }
/// <summary> /// 二手转让详情首页 /// </summary> /// <param name="id">帖子Id</param> /// <returns>View</returns> public ActionResult Index(int id) { if (id <= 0) { return(RedirectToAction("PageNotFound", "PageLink")); } else { var goods = transferGoods.Get(id); if (goods == null) { return(RedirectToAction("PageNotFound", "PageLink")); } if (User.Identity.IsAuthenticated) { var isFav = favorite.IsFavorite((int)Fx.Entity.ChannelCatagroy.FxGoodsTransfer, id, User.Identity.Name); ViewBag.IsFav = isFav; } else { ViewBag.IsFav = false; } return(View(goods)); } }