Änderungen Logik und GUI
This commit is contained in:
@@ -250,8 +250,6 @@ Partial Class CustomsAviso
|
||||
End Sub
|
||||
|
||||
Protected Sub btn_Auftraege_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
dt = Nothing
|
||||
If txt_Absender.Text IsNot "" Then
|
||||
txt_Absender.ValidateRequestMode = UI.ValidateRequestMode.Enabled
|
||||
|
||||
@@ -202,6 +202,7 @@
|
||||
</asp:Table>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label ID="lbl_status" runat="server" Font-Size="16px" ForeColor="Black" Text=""></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@ Partial Class Customers_Invoices
|
||||
Try
|
||||
Kdnrtext = Session.Item("CustomerID")
|
||||
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!")
|
||||
lbl_status.Text = "Dieser Bereich ist nicht gestattet! Ein Fehler ist bei der Validierung der ID aufgetreten! Bitte erneut versuchen!"
|
||||
End Try
|
||||
Page.UnobtrusiveValidationMode = UnobtrusiveValidationMode.WebForms
|
||||
DataBind()
|
||||
@@ -26,10 +26,8 @@ Partial Class Customers_Invoices
|
||||
If (Page.IsPostBack And normaltable.EnableViewState = False) Then
|
||||
Page.MaintainScrollPositionOnPostBack = True
|
||||
normaltable.EnableViewState = True
|
||||
|
||||
datevon = Date.Parse(pickdate1.Text)
|
||||
datebis = Date.Parse(pickdate2.Text)
|
||||
|
||||
Else
|
||||
Page.MaintainScrollPositionOnPostBack = False
|
||||
normaltable.EnableViewState = True
|
||||
@@ -40,7 +38,7 @@ Partial Class Customers_Invoices
|
||||
Dim erster = New Date(Now().Year, Now().Month, 1)
|
||||
Dim ersterdat = "1." + Now().Month.ToString + "." + Now().Year.ToString
|
||||
pickdate1.Text = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString
|
||||
' MsgBox(ersterdat)
|
||||
' lbl_status.Text=ersterdat)
|
||||
datevon = ersterdat
|
||||
datebis = Date.Parse(Now().Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString).ToString
|
||||
pickdate2.Text = Now().ToShortDateString()
|
||||
@@ -164,17 +162,15 @@ Partial Class Customers_Invoices
|
||||
reNr = ""
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub Send_Data_Click(sender As Object, e As EventArgs)
|
||||
dt = Nothing
|
||||
|
||||
valreq_pickdate1.Validate()
|
||||
valreq_pickdate2.Validate()
|
||||
If valreq_pickdate1.IsValid And valreq_pickdate2.IsValid And Kdnrtext = Not "" Then
|
||||
valDateRange_1.Validate()
|
||||
valDateRange_2.Validate()
|
||||
If Not String.IsNullOrEmpty(txt_Absender.Text) And valDateRange_1.IsValid And valDateRange_2.IsValid Then
|
||||
If valDateRange_1.IsValid And valDateRange_2.IsValid Then
|
||||
If Not String.IsNullOrEmpty(txt_Absender.Text) Then
|
||||
regexval_txt_Absender.Enabled = True
|
||||
regexval_txt_Absender.Validate()
|
||||
txt_Absender.ValidateRequestMode = UI.ValidateRequestMode.Enabled
|
||||
@@ -185,7 +181,7 @@ Partial Class Customers_Invoices
|
||||
Absender = String.Empty
|
||||
End If
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(txt_Empfaenger.Text) Then
|
||||
@@ -199,7 +195,7 @@ Partial Class Customers_Invoices
|
||||
Empfaenger = String.Empty
|
||||
End If
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(txt_KdNrAuftrag.Text) Then
|
||||
@@ -213,7 +209,7 @@ Partial Class Customers_Invoices
|
||||
KDNAFNR = String.Empty
|
||||
End If
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(txt_LKWNr.Text) Then
|
||||
@@ -227,7 +223,7 @@ Partial Class Customers_Invoices
|
||||
LKWNR = String.Empty
|
||||
End If
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(txt_ReNr.Text) Then
|
||||
@@ -241,7 +237,7 @@ Partial Class Customers_Invoices
|
||||
reNr = String.Empty
|
||||
End If
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
|
||||
@@ -250,7 +246,7 @@ Partial Class Customers_Invoices
|
||||
Try
|
||||
Absender = txt_Absender_M.Text
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(txt_Empfaenger_M.Text) Then
|
||||
@@ -258,7 +254,7 @@ Partial Class Customers_Invoices
|
||||
Try
|
||||
Empfaenger = txt_Empfaenger_M.Text
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(txt_KdNrAuftrag_M.Text) Then
|
||||
@@ -266,7 +262,7 @@ Partial Class Customers_Invoices
|
||||
Try
|
||||
KDNAFNR = txt_KdNrAuftrag_M.Text
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(txt_LKWNr_M.Text) Then
|
||||
@@ -274,7 +270,7 @@ Partial Class Customers_Invoices
|
||||
Try
|
||||
LKWNR = txt_LKWNr_M.Text
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
|
||||
@@ -283,7 +279,7 @@ Partial Class Customers_Invoices
|
||||
Try
|
||||
reNr = txt_ReNr_M.Text
|
||||
Catch ex As FormatException
|
||||
MsgBox(ex.Message)
|
||||
lbl_status.Text = ex.Message
|
||||
End Try
|
||||
End If
|
||||
|
||||
@@ -291,24 +287,24 @@ Partial Class Customers_Invoices
|
||||
Try
|
||||
Dim erster = New Date(Now().Year, Now().Month, 1)
|
||||
Dim ersterdat = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString
|
||||
' MsgBox(ersterdat)
|
||||
' lbl_status.Text=ersterdat)
|
||||
datevon = ersterdat
|
||||
pickdate1.Text = erster.Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString
|
||||
datebis = Date.Parse(Now().Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString).ToString
|
||||
pickdate2.Text = Date.Parse(Now().Day.ToString + "." + Now().Month.ToString + "." + Now().Year.ToString).ToString
|
||||
Catch ex As ValidationException When Date.ParseExact(pickdate1.Text, "dd.MM.yyyy", Nothing).Year < Date.ParseExact("2001", "yyyy", Nothing).Year And Date.ParseExact(pickdate2.Text, "dd.MM.yyyy", Nothing).Year > Date.ParseExact(Today, "dd.MM.yyyy", Nothing).Year
|
||||
MsgBox("Die Zeitzonen sind nicht gültig!", MsgBoxStyle.Exclamation)
|
||||
lbl_status.Text = "Die Zeitzonen sind nicht gültig!"
|
||||
End Try
|
||||
Else
|
||||
Try
|
||||
datevon = Date.Parse(pickdate1.Text)
|
||||
datebis = Date.Parse(pickdate2.Text)
|
||||
Catch ex As ValidationException When Date.ParseExact(pickdate1.Text, "dd.MM.yyyy", Nothing).Year < Date.ParseExact("2001", "yyyy", Nothing).Year And Date.ParseExact(pickdate2.Text, "dd.MM.yyyy", Nothing).Year > Date.ParseExact(Today, "dd.MM.yyyy", Nothing).Year
|
||||
MsgBox("Die Zeitzonen sind nicht gültig!", MsgBoxStyle.Exclamation)
|
||||
lbl_status.Text = "Die Zeitzonen sind nicht gültig!"
|
||||
End Try
|
||||
End If
|
||||
|
||||
'MsgBox(Kdnrtext)
|
||||
'lbl_status.Text=Kdnrtext)
|
||||
If String.IsNullOrEmpty(Kdnrtext) = False And String.IsNullOrEmpty(datevon.ToString) = False And String.IsNullOrEmpty(datebis.ToString) = False Then
|
||||
dt = VERAG_PROG_ALLGEMEIN.cRechnungsausgang.GET_LIST_WEB(Integer.Parse(Kdnrtext), datevon, datebis, Integer.Parse(reNr), Absender, Empfaenger, LKWNR, KDNAFNR)
|
||||
ElseIf String.IsNullOrEmpty(Kdnrtext) = True Or String.IsNullOrEmpty(datevon.ToString) = True And String.IsNullOrEmpty(datebis.ToString) = True And String.IsNullOrEmpty(reNr) = True And String.IsNullOrEmpty(Absender) = False And String.IsNullOrEmpty(LKWNR) = False And String.IsNullOrEmpty(Empfaenger) = False And String.IsNullOrEmpty(KDNAFNR) = False Then
|
||||
@@ -381,6 +377,9 @@ Partial Class Customers_Invoices
|
||||
tr.Cells.Add(tbl_cellNothing)
|
||||
normaltable.Rows.Add(tr)
|
||||
End If
|
||||
Else
|
||||
lbl_status.Text = "Error in valid date room"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user