Serverseitiges Ändern wurde angefangen implementiert zu werden.

This commit is contained in:
ja
2021-12-16 11:52:00 +01:00
parent 0b7f25475c
commit 53843457f1
9 changed files with 213 additions and 163 deletions

View File

@@ -1,4 +1,4 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Customers_Default2" %>
<%@ Page Title="" Language="VB" MasterPageFile="~/Customers/Customers.master" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Customers_Default2" Async="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"><%If String.Equals(Page.User.Identity.Name, "Admin") = False Then
FormsAuthentication.RedirectToLoginPage()
@@ -78,7 +78,8 @@
</td>
</tr>
<tr><td>
<tr><td><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></td></tr>
<tr><td><asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /></td></tr>
<tr><td><asp:Button ID="btn_TesthashrateServer" runat="server" Font-Overline="false" BorderStyle="Dashed" ClientIDMode="AutoID" OnClick="btn_TesthashrateServer_ClickAsync" Text="Test hashrate of Server!" /></td></tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -1,4 +1,4 @@

Imports Konscious.Security.Cryptography
Partial Class Customers_Default2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, e As EventArgs) Handles Me.Load
@@ -33,4 +33,9 @@ Partial Class Customers_Default2
txt_Fehlercodezuzahl.Text = finalstr
End If
End Sub
Protected Async Sub btn_TesthashrateServer_ClickAsync(sender As Object, e As EventArgs) Handles btn_TesthashrateServer.Click
Dim zahl As Integer = VERAG_VARIABLES.RandomInteger(5, Math.Pow(2, 5))
Dim pwhashresult As Byte() = Await TestPerformance.TestHashrateServer(zahl)
End Sub
End Class

View File

@@ -47,7 +47,7 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="script5" runat="server"></asp:ScriptManager>
<asp:ScriptManager ID="script5" runat="server" EnablePageMethods="true"></asp:ScriptManager>
<asp:UpdatePanel ID="panelupdate5" runat="server"><ContentTemplate>
<div class="align-self-flex-center" style="/*margin-top:5px;*/margin-left:25px; margin-top:0.6510416666666667vw; margin-right:25px;">
<div id="containerseiterand">
@@ -137,79 +137,26 @@
</div>
</div>
</div>
</div>
<asp:Button ID="Button_hid" runat="server" OnClick="TableRowClick" Style="display: none" />
</div>
</ContentTemplate></asp:UpdatePanel>
<!-- jQuery CDN - Slim version (=without AJAX) -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<!-- Popper.JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
<script type="text/javascript">
function TableRowClick(listtemp, Kennzeichen, Nat) {
<script type="text/javascript">
function TableRow_Click(Nat,Kennzeichen) {
let Speditionslabel = document.getElementById("<%=lbl_sped_Placeholder.ClientID%>")
let natplaceholder = document.getElementById("<%=lbl_Placeholder.ClientID%>")
Speditionslabel.textContent = Kennzeichen
natplaceholder.textContent = Nat
var tb = document.getElementById("<%=tbl_mainpage.ClientID%>");
while (tb.rows.length > 1) {
tb.deleteRow(1);
}
//debugger
//alert(Arr)
for (let outertabl of Array.from(listtemp.split("-"))) {
for (let arrint of Array.from(outertabl.split(";"))) {
for (let innertable = 0; innertable < arrint.length; innertable++) {
let SDLNr = arrint[innertable].toString;
innertable++;
let Bez = arrint[innertable].toString;
innertable++;
let Gueltigbis = arrint[innertable].toString;
innertable++;
let KartenNr = arrint[innertable].toString;
//alert(SDLNr)
//alert(Bez)
//alert(Gueltigbis)
//alert(KartenNr)
addRow(<%=tbl_mainpage.ClientID%>, SDLNr, Bez, Gueltigbis, KartenNr)
}
}
}
natplaceholder.textContent = Nat
}
function TableRowClick_M(listtemp_M, Kennzeichen, Nat) {
function TableRow_Click_M(Nat,Kennzeichen) {
let Speditionslabel = document.getElementById("<%=lbl_sped_Placeholder_M.ClientID%>")
let natplaceholder = document.getElementById("<%=lbl_Placeholder_M.ClientID%>")
Speditionslabel.textContent = Kennzeichen
natplaceholder.textContent = Nat
var tb = document.getElementById("<%=tbl_mainpage_M.ClientID%>");
while (tb.rows.length > 1) {
tb.deleteRow(1);
}
//debugger
//alert(Arr)
for (let outertable_M of Array.from(listtemp_M.split("-"))) {
for (let arrint_M of Array.from(outertable_M.split(";")))
for (let innertable = 0; innertable < arrint_M.length; innertable++) {
let SDLNr = arrint_M[innertable].toString;
innertable++;
let Bez = arrint_M[innertable].toString;
innertable++;
let Gueltigbis = arrint_M[innertable].toString;
innertable++;
let KartenNr = arrint_M[innertable].toString;
//alert(SDLNr)
//alert(Bez)
//alert(Gueltigbis)
//alert(KartenNr)
addRow(<%=tbl_mainpage_M.ClientID%>, SDLNr, Bez, Gueltigbis, KartenNr)
}
}
natplaceholder.textContent = Nat
}
function addRow(table1,par1,par2,par3,par4) {
let tableRef = table1;
@@ -246,6 +193,6 @@
newCell1.innerHTML = par2
newCell2.innerHTML = par3
newCell3.innerHTML = par4
}
</script>
}
</script>
</asp:Content>

View File

@@ -9,6 +9,20 @@ Partial Class LKWS
Dim Kdnrtext As String = String.Empty
Dim list As Collections.Generic.List(Of VERAG_PROG_ALLGEMEIN.cSDL_LKW) = Nothing
Dim list_M As Collections.Generic.List(Of VERAG_PROG_ALLGEMEIN.cSDL_LKW) = Nothing
Dim tbl2mainpagetemp As Table
Dim TableRows As List(Of TableRow) = New List(Of TableRow)
Dim TableRows_M As List(Of TableRow) = New List(Of TableRow)
Protected Sub Page_OnInit(sender As Object, e As EventArgs)
If TableRows.Count = 0 Then
For Each tr In TableRows
tbl_mainpage_M.Rows.Add(tr)
Next
Else
For Each tr In TableRows
tbl_mainpage.Rows.Add(tr)
Next
End If
End Sub
Protected Sub Page_Load(sender As Object, ByVal e As System.EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
@@ -57,7 +71,6 @@ Partial Class LKWS
Dim tc_KZ_Ab As TableCell = New TableCell()
Dim tc_Vermerk As TableCell = New TableCell()
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(401940, l1.KfzKennzeichen)
Dim list3 As List(Of String) = New List(Of String)
tc_KfzKennz.Text = l1.KfzKennzeichen
tr1.Cells.Add(tc_KfzKennz)
@@ -100,6 +113,7 @@ Partial Class LKWS
Dim strtemparr As String = String.Empty
Dim strtemp2 As String = String.Empty
Dim strarrtemp = String.Empty
tbl2mainpagetemp = New Table
For Each l2 In list2
Dim String2 As String = String.Empty
@@ -108,8 +122,21 @@ Partial Class LKWS
Else
Stringtemp = String.Empty
End If
list3.Add(l2.SDLNr.ToString + ";" + Stringtemp + ";" + l2.GültigBis.ToString + ";" + l2.KartenNr.ToString)
Dim tr As TableRow = New TableRow
Dim tc_SDL As TableCell = New TableCell
Dim tc_Bez As TableCell = New TableCell
Dim tc_gueltigbis As TableCell = New TableCell
Dim tc_Karten_Nr As TableCell = New TableCell
tc_SDL.Text = l2.SDLNr.ToString
tc_Bez.Text = Stringtemp
tc_gueltigbis.Text = l2.GültigBis.ToString
tc_Karten_Nr.Text = l2.KartenNr.ToString
tr.Cells.Add(tc_SDL)
tr.Cells.Add(tc_Bez)
tr.Cells.Add(tc_gueltigbis)
tr.Cells.Add(tc_Karten_Nr)
TableRows.Add(tr)
'MsgBox(TableRows.Count.ToString)
Next
If String.IsNullOrEmpty(l1.Nationalität) = True Then
strtemp2 = "Keine Angabe"
@@ -117,10 +144,7 @@ Partial Class LKWS
strtemp2 = l1.Nationalität
End If
For Each l4 In list3
strarrtemp = String.Join("-", l4.ToString)
Next
tr1.Attributes.Add("OnClick", "Javascript:TableRowClick(""" & strarrtemp & """,""" & l1.KfzKennzeichen & """,""" & strtemp2 & """)")
tr1.Attributes.Add("onclick", "Javascript:TableRow_Click(""" & strtemp2 & """,""" & l1.KfzKennzeichen & """)")
cnt += 1
tbl_sidemenue.Rows.Add(tr1)
Next
@@ -201,8 +225,7 @@ Partial Class LKWS
Next
End Sub
Protected Sub TableRowClick(ByVal sender As TableRow, e As EventArgs)
End Sub
Protected Sub btn_Suchen_M_Click(sender As Object, e As EventArgs)
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
@@ -261,9 +284,7 @@ Partial Class LKWS
cnt += 1
Next
End Sub
Protected Sub Button_hid_Click(sender As Object, e As EventArgs)
'MsgBox("Test erfolgreich!")
End Sub
Protected Sub btn_alle_M_Click(sender As Object, e As EventArgs)
If HttpContext.Current.Request.ServerVariables("SERVER_NAME") = "localhost" Then
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
@@ -348,9 +369,10 @@ Partial Class LKWS
For Each Ltenp In list2
str2temptemp = String.Join("-", Ltenp)
Next
tr1_M.Attributes.Add("OnClick", "Javascript:TableRowClick_M(""" & str2temptemp & """,""" & l3.KfzKennzeichen & """,""" & strtemp2 & """)")
tr1_M.Attributes.Add("OnClick", "Javascript:TableRow_Click_M(""" & strtemp2 & """,""" & l3.KfzKennzeichen & """)")
tbl_2.Rows.Add(tr1_M)
cnt += 1
Next
End Sub
End Class