22 lines
624 B
C#
22 lines
624 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using bahnplan.web.database;
|
|
using bahnplan.web.database.Tables;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
namespace bahnplan.web.Pages {
|
|
public class InspectionModel : PageModel {
|
|
public Ticket Ticket;
|
|
public Leg Leg;
|
|
public void OnGet() {
|
|
if (HttpContext.Session.GetString("authorized") != "true") {
|
|
return;
|
|
}
|
|
|
|
using var db = new Database.DbConn();
|
|
Ticket = db.Tickets.First(p => p.TicketId == int.Parse(Request.Query["id"]));
|
|
Leg = db.Legs.First(p => p.LegId == int.Parse(Request.Query["leg"]));
|
|
}
|
|
}
|
|
} |