public async virtual Task <ActionResult> BadgeAwards(string userName) { var badgeAwardsForUser = await BadgeAwardEditCollection.GetAllBadgeAwardsForUser(userName); //return RedirectToAction("Index"); return(PartialView(badgeAwardsForUser)); }
public async virtual Task <ActionResult> Export() { var contentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; var fileName = "PointsReportExport.xlsx"; var pointsReportCollection = await PointsReportCollection.GetAllPayoutsToApproveAsync(); var badgeAwardCollection = await BadgeAwardEditCollection.GetAllBadgeAwards(); using (var pointsReportExportModel = new PointsReportExportModel(pointsReportCollection, badgeAwardCollection)) { var fileBytes = pointsReportExportModel.CreateSpreadsheet(); return(File(fileBytes, contentType, fileName)); } }