public async Task <ActionResult> NeedApproval() { return(await Task.Run(() => { var list = new NewsApprovalList(); list.Message = "Select news and click on submit to approve."; list.ApprovalList = new List <NewsApproval>(); var topNewsBL = new TopNewsBL(); var result = topNewsBL.SelectTopNewsForApproval(); result.ToList().ForEach(v => { list.ApprovalList.Add( new NewsApproval { Selected = false, TopNewsID = v.TopNewsID, ImageUrl = v.ImageUrl, IsApproved = v.IsApproved, Heading = v.Heading, DttmCreated = v.DttmCreated }); }); return View(list); })); }
public async Task <ActionResult> NewsList() { return(await Task.Run(() => { var topNewsBL = new TopNewsBL(); var result = topNewsBL.SelectAll(DateTime.Now.AddDays(-1), DateTime.Now, string.Empty); return View(result); })); }