public ActionResult List(long SiteID, long MenuID, long CardNo, SearchModel Search) { ViewBag.SiteID = SiteID; ViewBag.MenuID = MenuID; ViewBag.UploadVPath = UpdFileInfo.GetVPathByMenuID(SiteID, MenuID); ViewBag.CardNo = CardNo; ViewBag.Search = Search; var model = ParallaxDAO.Get(CardNo, Search: Search); return(View(model)); }
public ActionResult Index(CardsModels model) { var datas = ParallaxDAO.Get(model.No, true); if (datas.Count == 0) { return(null); } int index = new Random().Next(datas.Count); var data = datas[index]; WorkV3.Common.SitePage curPage = WorkV3.Models.DataAccess.CardsDAO.GetPage(model.No); ViewBag.UploadVPath = UpdFileInfo.GetVPathByMenuID(curPage.SiteID, curPage.MenuID); ViewBag.ImgSrc = JsonConvert.DeserializeObject <ImageModel>(data.Img).Img; return(View(data)); }