Änderungen AJAX Calls sowie Loginladezeit durcj Erhöhung der Iterationen erhöht sowie dadurch die Sicherheit
This commit is contained in:
@@ -9,7 +9,7 @@ Imports System.Web.UI.WebControls
|
||||
|
||||
Partial Class LKWS
|
||||
Inherits System.Web.UI.Page
|
||||
Dim Kdnrtext As String = String.Empty
|
||||
Shared 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
|
||||
@@ -31,7 +31,12 @@ Partial Class LKWS
|
||||
|
||||
If Me.Page.User.Identity.IsAuthenticated Then
|
||||
Try
|
||||
Kdnrtext = Session.Item("CustomerID")
|
||||
If String.Equals(Session.Item("CustomerID"), String.Empty) Then
|
||||
Kdnrtext = Request.QueryString("P1")
|
||||
Else
|
||||
Kdnrtext = Session.Item("CustomerID")
|
||||
End If
|
||||
|
||||
Catch A As UnauthorizedAccessException When String.IsNullOrEmpty(Session.Item("CustomerID"))
|
||||
FormsAuthentication.RedirectToLoginPage()
|
||||
'MsgBox("Dieser Bereich ist nicht gestattet! Ein Fehler ist bei der Validierung der ID aufgetreten! Bitte erneut versuchen!", MsgBoxStyle.Information, "Error in User Area!")
|
||||
@@ -45,6 +50,13 @@ Partial Class LKWS
|
||||
Page.MaintainScrollPositionOnPostBack = False
|
||||
End If
|
||||
End Sub
|
||||
Public Function getkdnr() As String
|
||||
If String.Equals(HttpContext.Current.Session.Item("CustomerID").ToString, "") = False Then
|
||||
Return HttpContext.Current.Session.Item("CustomerID").ToString
|
||||
Else
|
||||
Return Kdnrtext
|
||||
End If
|
||||
End Function
|
||||
|
||||
Protected Sub btn_alle_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -56,7 +68,7 @@ Partial Class LKWS
|
||||
|
||||
Dim cnt As Integer = 0
|
||||
|
||||
list = VERAG_PROG_ALLGEMEIN.cSDL_LKW.GET_LIST_WEB(Integer.Parse(HttpContext.Current.Session.Item("CustomerID")))
|
||||
list = VERAG_PROG_ALLGEMEIN.cSDL_LKW.GET_LIST_WEB(Integer.Parse(Kdnrtext))
|
||||
Dim tblhrow As TableHeaderRow = New TableHeaderRow
|
||||
tblhrow.Cells.Add(tbhc_KFZKennz)
|
||||
tblhrow.Cells.Add(tbhc_Nat)
|
||||
@@ -126,7 +138,7 @@ Partial Class LKWS
|
||||
Dim strtemparr As String = String.Empty
|
||||
Dim strtemp2 As String = String.Empty
|
||||
Dim strarrtemp = String.Empty
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(HttpContext.Current.Session.Item("CustomerID")), l1.KfzKennzeichen)
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(Kdnrtext), l1.KfzKennzeichen)
|
||||
Dim stringtemtr As String = String.Empty
|
||||
Dim tr As TableRow = New TableRow
|
||||
Dim list3 As List(Of String) = New List(Of String)
|
||||
@@ -168,7 +180,7 @@ Partial Class LKWS
|
||||
strtemp2 = l1.Nationalität
|
||||
End If
|
||||
|
||||
tr1.Attributes.Add("onclick", "Javascript:doPostBack('""" + tr1.Cells.Item(0).Text + """,""" + strtemp2 + """')")
|
||||
tr1.Attributes.Add("onclick", "Javascript:doPostBack('""" + tr1.Cells.Item(0).Text + """,""" + strtemp2 + """,""" + Kdnrtext + """')")
|
||||
cnt += 1
|
||||
tbl_sidemenue.Rows.Add(tr1)
|
||||
Next
|
||||
@@ -268,7 +280,7 @@ Partial Class LKWS
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
End If
|
||||
tbl_2.Rows.Clear()
|
||||
list_M = VERAG_PROG_ALLGEMEIN.cSDL_LKW.GET_LIST_WEB(Integer.Parse(HttpContext.Current.Session.Item("CustomerID")))
|
||||
list_M = VERAG_PROG_ALLGEMEIN.cSDL_LKW.GET_LIST_WEB(Integer.Parse(getkdnr))
|
||||
Dim cnt As Integer = 0
|
||||
|
||||
headrow_M.Cells.Add(tbhc_KFZKennz_M)
|
||||
@@ -329,7 +341,7 @@ Partial Class LKWS
|
||||
tbl_mainpage_M.Rows.Clear()
|
||||
Dim cnt As Integer = 0
|
||||
|
||||
list_M = VERAG_PROG_ALLGEMEIN.cSDL_LKW.GET_LIST_WEB(Integer.Parse(HttpContext.Current.Session.Item("CustomerID")))
|
||||
list_M = VERAG_PROG_ALLGEMEIN.cSDL_LKW.GET_LIST_WEB(Integer.Parse(Kdnrtext))
|
||||
Dim tblhrow_M As TableHeaderRow = New TableHeaderRow
|
||||
|
||||
tblhrow_M.Cells.Add(tbhc_KFZKennz_M)
|
||||
@@ -394,18 +406,22 @@ Partial Class LKWS
|
||||
strtemp2 = l3.Nationalität
|
||||
End If
|
||||
tbl_mainpage_M.Rows.Clear()
|
||||
tr1_M.Attributes.Add("onclick", "Javascript:doPostBack_M('""" & tr1_M.Cells.Item(0).Text & """,""" & strtemp2 & """')")
|
||||
tr1_M.Attributes.Add("onclick", "Javascript:doPostBack_M('""" & tr1_M.Cells.Item(0).Text & """,""" & strtemp2 & """,""" & Kdnrtext & """')")
|
||||
cnt += 1
|
||||
tbl_2.Rows.Add(tr1_M)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
<WebMethod>
|
||||
<WebMethod(BufferResponse:=True, CacheDuration:=2400, Description:="Funktion zum zurückgeben einer Tabelle", EnableSession:=False, TransactionOption:=EnterpriseServices.TransactionOption.Supported)>
|
||||
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)>
|
||||
Public Shared Function filltable2(Kennzeichen As String) As List(Of Entry)
|
||||
Dim strtemp2 As String = Kennzeichen.Remove(Kennzeichen.Length - 1, 1)
|
||||
Dim strtemp3 As String = strtemp2.Remove(0, 1)
|
||||
MsgBox(Kdnrtext + vbCr + strtemp3)
|
||||
Dim list As List(Of Entry) = New List(Of Entry)
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(HttpContext.Current.Session.Item("CustomerID")), Kennzeichen)
|
||||
If list2.Count >= 1 Then
|
||||
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(Kdnrtext), Kennzeichen)
|
||||
If list2.Count > 0 Then
|
||||
For Each l2 In list2
|
||||
Dim Entrytemp As New Entry
|
||||
Entrytemp.SDL = l2.SDLNr.ToString
|
||||
@@ -424,18 +440,24 @@ Partial Class LKWS
|
||||
End If
|
||||
Return list
|
||||
End Function
|
||||
<Serializable>
|
||||
Public Class Entry
|
||||
Public SDL As String = String.Empty
|
||||
Public Bez As String = String.Empty
|
||||
Public Gueltigbis As String = String.Empty
|
||||
Public KartNr As String = String.Empty
|
||||
End Class
|
||||
<WebMethod>
|
||||
|
||||
<WebMethod(BufferResponse:=True, CacheDuration:=2400, Description:="Funktion zum zurückgeben einer Tabelle", EnableSession:=False, TransactionOption:=EnterpriseServices.TransactionOption.Supported)>
|
||||
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)>
|
||||
Public Shared Function filltable2_M(Kennzeichen As String) As List(Of Entry)
|
||||
Dim strtemp2 As String = Kennzeichen.Remove(Kennzeichen.Length - 1, 1)
|
||||
Dim strtemp3 As String = strtemp2.Remove(0, 1)
|
||||
MsgBox(Kdnrtext + vbCr + strtemp3)
|
||||
Dim list As List(Of Entry) = New List(Of Entry)
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(HttpContext.Current.Session.Item("CustomerID")), Kennzeichen)
|
||||
If list2.Count >= 1 Then
|
||||
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(Kdnrtext), Kennzeichen)
|
||||
If list2.Count > 0 Then
|
||||
For Each l2 In list2
|
||||
Dim Entrytemp As New Entry
|
||||
Entrytemp.SDL = l2.SDLNr.ToString
|
||||
|
||||
Reference in New Issue
Block a user