Default Datum voreingestellt beim Laden der Seite.

This commit is contained in:
ja
2021-11-10 11:25:21 +01:00
parent f442d666c6
commit 34795608f3
3 changed files with 40 additions and 48 deletions

View File

@@ -17,7 +17,7 @@ Partial Class Customers_Default3
Dim reNr As String = "-1"
Dim provider As CultureInfo = CultureInfo.InvariantCulture
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Me.Page.User.Identity.IsAuthenticated Then
FormsAuthentication.RedirectToLoginPage()
Else
@@ -45,20 +45,19 @@ Partial Class Customers_Default3
DataBind()
tbl_Header_row.TableSection = TableRowSection.TableHeader
If (Page.IsPostBack And normaltable.EnableViewState = False) Then
If (Page.IsPostBack) Then
Page.MaintainScrollPositionOnPostBack = True
normaltable.EnableViewState = True
If valreq_pickdate1.IsValid And valreq_pickdate2.IsValid Then
If valreq_pickdate1.IsValid Or valreq_pickdate2.IsValid Then
datevon = Date.Parse(pickdate1.Text)
datebis = Date.Parse(pickdate2.Text)
Else
Dim erster = New Date(Now().Year, Now().Month, 1)
datevon = erster
datebis = Date.Parse(Now.ToShortDateString)
pickdate1.Text = erster.ToShortDateString()
pickdate2.Text = Date.Now.ToShortDateString()
End If
End If
Dim erster = New Date(Now().Year, Now().Month, 1)
datevon = erster
datebis = Date.Parse(Now.ToShortDateString)
pickdate1.Text = erster.ToUniversalTime.ToString("yyyy-MM-dd")
pickdate2.Text = Date.Now.ToUniversalTime.ToString("yyyy-MM-dd")
End If
End Sub