- Replaced button in `Details.cshtml` with a link to a new document viewer page. - Created `DocumentViewer.cshtml` to display PDFs using an iframe, with a back button and a link to an experimental DevExpress viewer. - Introduced `DocumentViewerModel` in `DocumentViewer.cshtml.cs` for handling invoice ID and PDF URL. - Updated `OnGetAsync` in `ViewPdf.cshtml.cs` to set `Content-Disposition` to inline for better PDF rendering in the browser.
17 lines
414 B
C#
17 lines
414 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
namespace DXApp.TemplateKitProject.Pages.Invoices;
|
|
|
|
public class DocumentViewerModel : PageModel
|
|
{
|
|
[BindProperty(SupportsGet = true)]
|
|
public int Id { get; set; }
|
|
|
|
public string PdfUrl => $"/Invoices/ViewPdf?id={Id}";
|
|
|
|
public void OnGet()
|
|
{
|
|
// Keine serverseitige Logik nötig für die erste Version.
|
|
}
|
|
} |