Änderungen Implementierung Fehlernummern-System in jeder Seite

This commit is contained in:
ja
2021-11-17 13:19:35 +01:00
parent 2d4c767460
commit 22e7360f80
21 changed files with 110 additions and 4 deletions

View File

@@ -2,7 +2,15 @@
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub
Sub test()

View File

@@ -31,7 +31,7 @@
If Not Me.Page.User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage()
End If
VERAG_VARIABLES.initerrorcount()
' MsgBox ("test")
'Dim con As New MySqlConnection
'Dim cmd As New MySqlCommand

View File

@@ -17,6 +17,7 @@ Partial Class CustomsAviso
Dim wasmobile As Boolean = True
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Page.UnobtrusiveValidationMode = UnobtrusiveValidationMode.WebForms
VERAG_VARIABLES.initerrorcount()
If Me.Page.User.Identity.IsAuthenticated Then
If Me.Page.User.Identity.Name = "userwithlongername" Or Me.Page.User.Identity.Name = "test" Then

View File

@@ -3,6 +3,7 @@ Partial Class Customers_Default
Inherits System.Web.UI.Page
Dim Kdnrtext As String = String.Empty
Protected Sub Page_Load(sender As Object, e As EventArgs)
If Me.Page.User.Identity.IsAuthenticated And String.Equals(Me.Page.User.Identity.Name, "Admin") = True Then
Try
Kdnrtext = Session.Item("CustomerID")
@@ -14,8 +15,10 @@ Partial Class Customers_Default
End If
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
VERAG_VARIABLES.initerrorcount()
Else
Page.MaintainScrollPositionOnPostBack = False
VERAG_VARIABLES.initerrorcount()
End If
End Sub

View File

@@ -3,8 +3,10 @@ Partial Class Customers_Default2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, e As EventArgs)
If Page.IsPostBack Then
Page.MaintainScrollPositionOnPostBack = True
VERAG_VARIABLES.initerrorcount()
Else
Page.MaintainScrollPositionOnPostBack = False
VERAG_VARIABLES.initerrorcount()
End If
End Sub

View File

@@ -21,6 +21,8 @@ Partial Class Customers_Default3
Dim provider As CultureInfo = CultureInfo.InvariantCulture
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Not Me.Page.User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage()
Else

View File

@@ -3,6 +3,7 @@ Partial Class LKWS
Inherits System.Web.UI.Page
Dim Kdnrtext As String = String.Empty
Protected Sub Page_Load(sender As Object, ByVal e As System.EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Me.Page.User.Identity.IsAuthenticated Then
Try
Kdnrtext = Session.Item("CustomerID")

View File

@@ -3,9 +3,15 @@ Partial Class Welcome
Inherits System.Web.UI.Page
Dim Kdnrtext As String = String.Empty
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Me.Page.User.Identity.IsAuthenticated Then
Try
Kdnrtext = Session.Item("CustomerID")
If Page.IsPostBack Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
Catch A As UnauthorizedAccessException When String.IsNullOrEmpty(Kdnrtext)
MsgBox("Dieser Bereich ist nicht gestattet! Ein Fehler ist bei der Validierung der ID aufgetreten! Bitte erneut versuchen!", MsgBoxStyle.Information, "Error in User Area!")
End Try

View File

@@ -6,6 +6,7 @@ Partial Class Customers_Default3
Dim Abfertigungsnummer As String = String.Empty
Dim RK_ID As String = String.Empty
Protected Sub Page_Load(sender As Object, ByVal e As System.EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Me.Page.User.Identity.IsAuthenticated Then
Try
Kdnrtext = Session.Item("CustomerID")

View File

@@ -7,6 +7,7 @@ Partial Class DownloadsJulius
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
Page.MaintainScrollPositionOnPostBack = True
Dim filePaths As String() = Directory.GetFiles(Server.MapPath("~/downloads/"))
Dim files As New List(Of ListItem)()
@@ -15,6 +16,8 @@ Partial Class DownloadsJulius
Next
GridView1.DataSource = files
GridView1.DataBind()
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub

View File

@@ -3,7 +3,12 @@ Partial Class js_InfoPanel
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
BackButton.Attributes.Add("onClick", "javascript:history.back(); return false;")
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
'Progress bar
updateProgBar(10)
'Label4.Attributes.CssStyle.Add("font-weight", " bolder")

View File

@@ -8,7 +8,13 @@
<script runat="server">
Sub Page_Load() Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
' MsgBox ("test")
'Dim con As New MySqlConnection
'Dim cmd As New MySqlCommand

View File

@@ -6,6 +6,14 @@ Partial Class login_CreateUser
If User.Identity.IsAuthenticated = False Then
FormsAuthentication.RedirectToLoginPage()
End If
If IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
VERAG_VARIABLES.initerrorcount()
Else
MaintainScrollPositionOnPostBack = False
VERAG_VARIABLES.initerrorcount()
End If
End Sub
Protected Sub LinkButton1_Click(sender As Object, e As EventArgs)

View File

@@ -9,7 +9,14 @@ Partial Class ForgotPW
Inherits System.Web.UI.Page
Dim ConnectionString As String = String.Empty
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
VERAG_VARIABLES.initerrorcount()
Else
Page.MaintainScrollPositionOnPostBack = False
VERAG_VARIABLES.initerrorcount()
End If
End Sub
Protected Sub btn_Back_Click(sender As Object, e As EventArgs)

View File

@@ -4,6 +4,12 @@ Partial Class login_Logged_IN
Protected Sub Page_Load(sender As Object, e As EventArgs)
lbl_Loggedin.ForeColor = Drawing.Color.White
lbl_Loggedin.Style.Add("font-weight", "800")
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub
Protected Sub LogoutButton_Click(sender As Object, e As EventArgs)
FormsAuthentication.SignOut()

View File

@@ -9,7 +9,12 @@ Partial Class login_FLEX
Dim passw As String = String.Empty
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub
Protected Sub ValidateUser(sender As Object, e As EventArgs)

View File

@@ -3,7 +3,15 @@ Imports System.Data
Partial Class login_TEST
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub
Protected Sub ValidateUser(sender As Object, e As EventArgs)
Dim userId As Integer = 0
' cDBFunctions.GetNewOpenConnection()

View File

@@ -1,5 +1,13 @@

Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub
End Class

View File

@@ -1,8 +1,19 @@

Imports System.Web.Configuration
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub
Protected Sub LogoutButton_Click(sender As Object, e As EventArgs)
FormsAuthentication.SignOut()
Session.Clear()

View File

@@ -2,6 +2,14 @@
Partial Class navigation
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
End Sub
End Class

View File

@@ -22,6 +22,13 @@
<script runat="server">
Sub Page_Load() Handles Me.Load
VERAG_VARIABLES.initerrorcount()
If Page.IsPostBack = True Then
Page.MaintainScrollPositionOnPostBack = True
Else
Page.MaintainScrollPositionOnPostBack = False
End If
' MsgBox ("test")
'Dim con As New MySqlConnection
'Dim cmd As New MySqlCommand