/// <summary> /// NOP 3.826 /// </summary> /// <returns></returns> public ActionResult ExportXlsx() { if (!_permissionService.Authorize(StandardPermissionProvider.ManageDiscounts)) { return(AccessDeniedView()); } DiscountType?discountType = null; try { var bytes = _exportManager.ExportDiscountsToXlsx(_discountService.GetAllDiscounts(discountType: discountType, showHidden: true)); return(File(bytes, MimeTypes.TextXlsx, "discounts.xlsx")); } catch (Exception exc) { ErrorNotification(exc); return(RedirectToAction("List")); } }