public async Task <IActionResult> NewsRelation(int Id, int Page) { string url = _appSetting.UrlApi + "api/article/relation/get?TopRow=10&ArticleID=" + Id + "&Page=1&PageSize=2"; var list = await ApiService.GetAsync <RootObject <ArticleModel> >(url); var _data = new DonateOnlineModel(); _data.Page = Page; _data.Total = list.TotalRow; _data.ListArt = list.Items; _data.TotalPage = (int)Math.Ceiling((decimal)(list.TotalRow / 2)); ViewBag.Id = Id; ViewBag.UrlRoot = _appSetting.UrlRoot; return(PartialView(_data)); }
public async Task <IActionResult> DonateOnlinePart(int Page = 1, int PageSize = 10) { string url = _appSetting.UrlApi + "api/article/get-list?TopRow=1000&MenuID=0&UrlRedirect=ung-ho-truc-tuyen&isHot=-1&Page=" + Page + "&PageSize=" + PageSize; var list = await ApiService.GetAsync <RootObject <ArticleModel> >(url); var data = new DonateOnlineModel { ListArt = list.Items, Page = Page, PageSize = PageSize, Total = list.TotalRow, TotalPage = (int)Math.Ceiling((decimal)(list.TotalRow / PageSize)) }; ViewBag.UrlRoot = _appSetting.UrlRoot; return(View(data)); }