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