Änderungen JQUERY und JSON De-/Serializierungsvorgänge.

This commit is contained in:
ja
2022-01-10 09:11:39 +01:00
parent 7a0343007d
commit 0f58739266
3 changed files with 20 additions and 19 deletions

View File

@@ -44,9 +44,9 @@ Public Class VERAG_VARIABLES
Else Else
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password))) Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt Argon.Salt = salt
Argon.DegreeOfParallelism = 28 Argon.DegreeOfParallelism = 32
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5) Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5)
Argon.MemorySize = (((nIterations * 8.685 - (nIterations * 0.56) / 1.85 * 2.28) / 10.28) + 1.024 * 816) Argon.MemorySize = (((nIterations * 7.685 - (nIterations * 0.56) / 1.85 * 2.28) / 10.28) + 1.024 * 416)
Return Argon.GetBytes(nHash) Return Argon.GetBytes(nHash)
End If End If
@@ -65,9 +65,9 @@ Public Class VERAG_VARIABLES
Else Else
Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password))) Dim Argon As Argon2id = New Argon2id(Encoding.UTF8.GetBytes(VERAG_PROG_ALLGEMEIN.cCryptography3.Encrypt(password)))
Argon.Salt = salt Argon.Salt = salt
Argon.DegreeOfParallelism = 28 Argon.DegreeOfParallelism = 32
Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5) Argon.Iterations = nIterations * VERAG_VARIABLES.RandomInteger(2, 5)
Argon.MemorySize = (((nIterations * 8.685 - (nIterations * 0.56) / 1.85 * 2.28) / 10.28) + 1.024 * 816) Argon.MemorySize = (((nIterations * 7.685 - (nIterations * 0.56) / 1.85 * 2.28) / 10.28) + 1.024 * 416)
Return Await Argon.GetBytesAsync(nHash) Return Await Argon.GetBytesAsync(nHash)
End If End If
End Function End Function

View File

@@ -352,12 +352,13 @@
} }
}); });
function OnSuccess(success) { function OnSuccess(success) {
alert('horray! 200 status code!');
addheader(); addheader();
alert(success.rows.length) alert('horray! 200 status code!');
alert(success)
for (let i = 0; i < success.rows.length; i++) { for (let i = 0; i < success.rows.length; i++) {
let row = $('<tr><td>' + success[i].SDL + '</td><td>' + success[i].Bez + '</td><td>' + success[i].DateGueltig + '</td><td>' + success[i].KartNr + '</td></tr>'); //let row = $('<tr><td>' + success[i].SDL + '</td><td>' + success[i].Bez + '</td><td>' + success[i].DateGueltig + '</td><td>' + success[i].KartNr + '</td></tr>');
table.append(row); //table.rows.add(row);
addNewRow(success[i].d.SDLNr, success[i].d.Bezeichnung, success[i].d.DateGueltig,success[i].d.KartNr)
} }
} }
function OnFailure(error) { function OnFailure(error) {
@@ -395,10 +396,9 @@
//addNewRow(SDL,Bez,Datguenstig,KartNr) //addNewRow(SDL,Bez,Datguenstig,KartNr)
// Pagemethods.filltable2(<%' =tbl_mainpage_M%> , SDL, Bez, Datguenstig, KartNr) // Pagemethods.filltable2(<%' =tbl_mainpage_M%> , SDL, Bez, Datguenstig, KartNr)
//} //}
var data = { var data = {};
"Kennzeichen": id_M.split(',')[0], data.Kennzeichen = id_M.split(',')[0];
"NatLKW": id_M.split(',')[1] data.NatLKW = id_M.split(',')[1];
};
$.ajax({ $.ajax({
type: "POST", type: "POST",
@@ -407,18 +407,18 @@
dataType: "json", dataType: "json",
data: JSON.stringify(data), data: JSON.stringify(data),
success: function (result) { success: function (result) {
OnSuccess(result.d); OnSuccess_M(result.d);
}, },
error: function (jqXHR, textStatus, errorThrown) { error: function (jqXHR, textStatus, errorThrown) {
alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown); alert("Status:" + jqXHR.status + "\nStatusText: " + textStatus + "\nError:" + errorThrown);
} }
}); });
function OnSuccess(success) { function OnSuccess_M(success_M) {
alert('horray! 200 status code!');
addheader_M(); addheader_M();
for (let i = 0; i < success.length; i++) { alert('horray! 200 status code!');
let row = $('<tr><td>' + success[i].SDL + '</td><td>' + success[i].Bez + '</td><td>' + success[i].DateGueltig + '</td><td>' + success[i].KartNr + '</td></tr>'); for (let i = 0; i < success_M.rows.length; i++) {
table_M.append(row); let row = $('<tr><td>' + success_M[i].SDL + '</td><td>' + success_M[i].Bez + '</td><td>' + success_M[i].DateGueltig + '</td><td>' + success_M[i].KartNr + '</td></tr>');
//addNewRow_M(success_M[i].SDL, success_M[i].Bez,success_M[i].DateGueltig,success_M[i].KartNr);
} }
} }
function OnFailure(error) { function OnFailure(error) {

View File

@@ -421,6 +421,7 @@ Partial Class LKWS
tr.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;") tr.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;")
tbl.Rows.Add(tr) tbl.Rows.Add(tr)
Next Next
tbl.EnableViewState = True
Return tbl Return tbl
End Function End Function
<WebMethod> <WebMethod>
@@ -447,7 +448,7 @@ Partial Class LKWS
tr_M.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;") tr_M.Attributes.Add("style", "background-color:#ff2500;color:#fff;font-weight:400;")
Tbl.Rows.Add(tr_M) Tbl.Rows.Add(tr_M)
Next Next
Tbl.EnableViewState = True
Return Tbl Return Tbl
End Function End Function
End Class End Class