Update vor Umbau Service

This commit is contained in:
Stefan Hutter
2026-02-13 06:42:52 +01:00
parent 41588e8c92
commit 9e64ca707d
925 changed files with 1109250 additions and 584 deletions

View File

@@ -0,0 +1,143 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectTable.aspx.cs" Inherits="WebApp.SelectTable" %>
<!DOCTYPE html>
<html>
<head runat="server">
<%--<title>Daten & JSON Editor</title>--%>
<script src="/Scripts/ace/ace.js"></script>
<script src="/Scripts/ace/mode-json.min.js"></script>
<script src="/Scripts/ace/theme-tomorrow.min.js"></script>
<script src="/Scripts/ace/worker-json.js"></script>
<script src="/Scripts/jquery.min.js"></script>
<script src="/Scripts/ace/ext-searchbox.js"></script>
<style>
html, body { margin:0; padding:0; height:100%; font-family:Arial; background:#f4f6f8; }
.page-header {
background-color: #2563eb;
color: #fff;
padding: 15px 30px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.page-header h1 {
margin:0;
font-size:1.8rem;
}
.page-header p {
margin:4px 0 0 0;
font-size:0.95rem;
color:#dbeafe;
}
.layout { display:flex; height:calc(100% - 70px); } /* 70px für header */
.left {
width:45%;
padding:20px;
background:#fff;
border-right:1px solid #ddd;
overflow:auto;
}
.right {
width:55%;
padding:0;
height:100%;
display:flex;
flex-direction: column;
}
#editor {
flex:1;
width:100%;
}
select { width:100%; padding:8px; margin-bottom:12px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th, td { padding:8px; border-bottom:1px solid #e5e7eb; }
tr:hover { background:#f9fafb; }
.pager a, .pager span { padding:5px 9px; border:1px solid #ddd; border-radius:5px; margin-left:4px; text-decoration:none; font-size:13px; }
.pager span { background:#2563eb; color:#fff; border-color:#2563eb; }
a.open { color:#2563eb; cursor:pointer; text-decoration:none; }
a.open:hover { text-decoration:underline; }
</style>
</head>
<body>
<!-- TITEL -->
<div class="page-header">
<h1>OnDoc-Json-Viewer</h1>
<p>Tabellen auswählen, Datensätze ansehen und JSON anzeigen</p>
</div>
<!-- LAYOUT -->
<div class="layout">
<form runat="server" class="left">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" />
<h2>Tabellen & Datensätze</h2>
<asp:DropDownList
ID="ddlTables"
runat="server"
AutoPostBack="true"
OnSelectedIndexChanged="ddlTables_SelectedIndexChanged" />
<asp:GridView
ID="gvData"
runat="server"
AutoGenerateColumns="true"
AllowPaging="true"
PageSize="20"
PagerStyle-CssClass="pager"
OnPageIndexChanging="gvData_PageIndexChanging"
OnRowCreated="gvData_RowCreated"
OnRowDataBound="gvData_RowDataBound" />
</form>
<!-- ACE EDITOR außerhalb des Form-Tags -->
<div class="right">
<div id="editor"></div>
</div>
</div>
<script>
const editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.session.setMode("ace/mode/json");
editor.setShowPrintMargin(false);
editor.session.setTabSize(2);
editor.session.setUseSoftTabs(true);
//let editor;
//$(function () {
// editor = ace.edit("editor");
// editor.setTheme("ace/theme/tomorrow");
// editor.session.setMode("ace/mode/json");
// editor.setShowPrintMargin(false);
// editor.session.setTabSize(2);
// editor.session.setUseSoftTabs(true);
// editor.commands.addCommand({
// name: "find",
// bindKey: { win: "Ctrl-F", mac: "Command-F" },
// exec: function (ed) {
// ace.require("ace/ext/searchbox").Search(ed);
// }
// });
//});
function loadJson(tableKey, id) {
editor.setValue("// lade JSON ...", -1);
PageMethods.GetJson(
tableKey,
id,
function (result) {
editor.setValue(result, -1);
},
function (err) {
editor.setValue(JSON.stringify({ error: err.get_message() }, null, 2), -1);
}
);
}
</script>
</body>
</html>