public async Task <IActionResult> BookPageDetail(Guid Id) { var content = await contentBusiness.GetContentById(Id); ViewData["DataModel"] = content.MediaResource.OrderBy(x => x.Order).Select(x => x.ActualPath).ToList(); return(View()); }
public async Task <IActionResult> AddOrUpdate(Guid?Id) { ViewData["DataType"] = typeof(ContentEntry); if (Id != null) { var contentEntry = await contentBusiness.GetContentById(Id.Value); ViewData["DataModel"] = contentEntry; } return(View()); }
public async Task <IActionResult> GetContentDetail(Guid Id) { var userIdStr = User.Claims?.FirstOrDefault(x => x.Type == "OryxUser")?.Value; ContentEntry apiMsg; if (!string.IsNullOrEmpty(userIdStr)) { apiMsg = await contentBusiness.GetContentByIdSetLog(Id, userIdStr); } else { apiMsg = await contentBusiness.GetContentById(Id); } return(Json(apiMsg)); }
public async Task OnGet(Guid?cid) { await HttpContext.Session.LoadAsync(); var userId = HttpContext.Session.GetString(UserAccountBusiness.UserAccountSessionkey); if (cid != null) { contentEntry = await contentBusiness.GetContentById(cid.Value); if (contentEntry.Order > 1) { if (string.IsNullOrEmpty(userId)) { NeedPay = true; } else { var _userId = Guid.Parse(userId); var payapiLog = userAccountBusiness.userAccountAccessor.All <PayAPILog>().FirstOrDefault(x => x.UserAccountId == _userId); if (payapiLog == null) { NeedPay = true; } else { if (payapiLog.EndTime == null || payapiLog.EndTime < DateTime.Now) { NeedPay = true; } } } } NextCid = await contentBusiness.GetNextContentId(contentEntry); PrevCid = await contentBusiness.GetPrevContentId(contentEntry); } else { NotFound(); } }
public async Task OnGet(Guid id) { var content = await contentBusiness.GetContentById(id); ImgList = content.MediaResource.Select(x => x.ActualPath).ToList(); }