This commit is contained in:
2021-10-20 22:24:56 +02:00
parent 787491cf6b
commit 2d7bb951d2
26 changed files with 1204 additions and 415 deletions

View File

@@ -47,6 +47,7 @@ Public Class usrcntlAktDetailsATILLANeu
Dim WithEvents timerAktUebernommen As New Timer
Dim SQL As New SDL.SQL
Dim ADMIN As New cADMIN
Dim painted = False ' Damit gridVermerke Formattierung nicht dauernd anspringt..
Sub New(AvisoID)
@@ -57,14 +58,25 @@ Public Class usrcntlAktDetailsATILLANeu
End Sub
Public Sub reload(id)
AvisoID = id
UsrCntlVermerkeATilla1.init(id)
VERAG_PROG_ALLGEMEIN.cSendungen.LOAD_LIST(SENDUNG_LIST, 0, AvisoID)
TextBox1.Text = ""
If SENDUNG_LIST IsNot Nothing AndAlso SENDUNG_LIST.Count > 0 Then
TextBox1.Text = SENDUNG_LIST(0).AbfertigungsNr
End If
Dim SENDUNG = Nothing
If SENDUNG_LIST IsNot Nothing AndAlso SENDUNG_LIST.Count > 0 Then
SENDUNG = SENDUNG_LIST(0)
End If
UsrCntlVermerkeATilla1.init(id, SENDUNG)
' reloadTimer.Enabled = True
loaded = False
pnlOptionen.Visible = False
pnlDetailsRechts.Enabled = False
pnlDetailsRechts.Cursor = Cursors.WaitCursor
AvisoID = id
Dim v As Boolean = (AvisoID > 0)
setVisible(btnAnkunft, v)
setVisible(btnFreigabe, v)
@@ -80,12 +92,7 @@ Public Class usrcntlAktDetailsATILLANeu
Details_anzeigen()
VERAG_PROG_ALLGEMEIN.cSendungen.LOAD_LIST(SENDUNG_LIST, 0, AvisoID)
TextBox1.Text = ""
If SENDUNG_LIST IsNot Nothing AndAlso SENDUNG_LIST.Count > 0 Then
TextBox1.Text = SENDUNG_LIST(0).AbfertigungsNr
End If
pnlDetailsRechts.Enabled = True
pnlDetailsRechts.Cursor = Cursors.Default
@@ -356,6 +363,7 @@ Public Class usrcntlAktDetailsATILLANeu
.Columns("Mitarbeiter").MinimumWidth = 50
.Columns("Mitarbeiter").HeaderText = "Mitarbeiter"
.Columns("Hinweis_Vermerk_Anzeige").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("SMSId").Visible = False 'tblSnd_Empfaengernicht anzeigen
' .Columns.Add(New DataGridViewButtonColumn)
@@ -407,7 +415,7 @@ Public Class usrcntlAktDetailsATILLANeu
Dim sendwhere = ""
Dim hSQL As String = " SELECT TOP 1000 [VermerkID],[AvisoID], [SendungID],[VermerkeCode], [Datum],[MitarbeiterId],tblSendungen.tblSnd_PosUnterNr," &
"/* CASE WHEN VermerkeCode IS NULL OR VermerkeCode IN (25,28,29,30,35,46,47) THEN Hinweis_Vermerk ELSE VermerkeCodes.Bezeichnung END as [Hinweis_Vermerk_Anzeige],*/ Hinweis_Vermerk as [Hinweis_Vermerk_Anzeige],[Hinweis_Vermerk], tblSendungen.tblSnd_Empfaenger ,[Mitarbeiter]" &
"/* CASE WHEN VermerkeCode IS NULL OR VermerkeCode IN (25,28,29,30,35,46,47) THEN Hinweis_Vermerk ELSE VermerkeCodes.Bezeichnung END as [Hinweis_Vermerk_Anzeige],*/ Hinweis_Vermerk as [Hinweis_Vermerk_Anzeige],[Hinweis_Vermerk], tblSendungen.tblSnd_Empfaenger ,[Mitarbeiter],SMSId" &
" FROM [Vermerke] LEFT JOIN VermerkeCodes ON [VermerkeCode]=VermerkeCodes.VermerkCodeId " &
" LEFT JOIN tblSendungen ON [SendungID]=tblSendungen.tblSnd_SendungID " &
" WHERE AvisoID = " & AvisoID & " " & sendwhere & " " &
@@ -427,6 +435,7 @@ Public Class usrcntlAktDetailsATILLANeu
gridVermerke_SpaltenFestlegen()
timer.Enabled = True
painted = False
End Sub
@@ -586,6 +595,9 @@ Public Class usrcntlAktDetailsATILLANeu
myVermerk.VermerkCodeId = 37
VermerkeDAL.SpeichernVermerk(myVermerk)
init = True 'Vermerke_anzeigen(e.RowIndex)': initDgvSendungen()
Case "46"
MsgBox("SMS " & gridVermerke.Rows(e.RowIndex).Cells("VermerkeOptions").ToolTipText)
init = False 'Vermerke_anzeigen(e.RowIndex)': initDgvSendungen()
End Select
loaded = False
Dim tmpIndex = -1
@@ -597,6 +609,7 @@ Public Class usrcntlAktDetailsATILLANeu
Private Sub gridVermerke_Paint(sender As Object, e As PaintEventArgs) Handles gridVermerke.Paint
' If dgvSendungen.RowCount = 0 Then Exit Sub
If painted Then Exit Sub
Try
For Each r As DataGridViewRow In gridVermerke.Rows
' If r.Cells("VermerkeOptions").GetType.Name = "DataGridViewLinkCell" Then
@@ -669,9 +682,44 @@ Public Class usrcntlAktDetailsATILLANeu
optionCell.Value = "Kontaktdaten erhalten"
optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Kontaktdaten erhalten' einzutragen."
End If
Case 46
If r.Cells("SMSId").Value IsNot DBNull.Value AndAlso IsNumeric(r.Cells("SMSId").Value) Then
Dim SMS As New VERAG_PROG_ALLGEMEIN.cSMS(r.Cells("SMSId").Value)
optionCell.ToolTipText = "SMS Satus"
optionCell.Style.BackColor = Color.White
optionCell.LinkColor = Color.Black
'Select Case MSG.Status
' Case MessageStatus.Expired, MessageStatus.Failed, MessageStatus.FailedAuthorisation, MessageStatus.Cancelled, MessageStatus.Rejected
Select Case SMS.sms_Status
Case -1 : optionCell.Value = ""
Case com.esendex.sdk.core.MessageStatus.Submitted, com.esendex.sdk.core.MessageStatus.Sent, com.esendex.sdk.core.MessageStatus.Connecting, com.esendex.sdk.core.MessageStatus.Acknowledged, com.esendex.sdk.core.MessageStatus.Scheduled
optionCell.Value = "wartend..."
optionCell.Style.BackColor = Color.PapayaWhip
optionCell.Style.SelectionBackColor = optionCell.Style.BackColor
Case com.esendex.sdk.core.MessageStatus.Delivered, com.esendex.sdk.core.MessageStatus.PartiallyDelivered
optionCell.Value = "OK - Empfangen!"
optionCell.LinkColor = Color.Green
' optionCell.Style.BackColor = Color.Green
' optionCell.LinkColor = Color.White
'optionCell.Style.SelectionBackColor = optionCell.Style.BackColor
Case Else : optionCell.Value = "SMS: Sendefehler!"
optionCell.ToolTipText = "Sendefehler: " & SMS.sms_Failure
optionCell.LinkColor = Color.Red
optionCell.Style.BackColor = Color.PapayaWhip
optionCell.Style.Font = New Font(Me.Font.FontFamily, Me.Font.Size, FontStyle.Bold)
'optionCell.LinkColor = Color.White
'optionCell.Style.SelectionBackColor = optionCell.Style.BackColor
End Select
End If
End Select
End If
Next
painted = True
Catch ex As Exception
MsgBox(ex.Message)
@@ -1288,6 +1336,7 @@ Public Class usrcntlAktDetailsATILLANeu
Dim SND As VERAG_PROG_ALLGEMEIN.cSendungen = SENDUNG_LIST(0)
Dim f As New SDL.frmZollanmeldung(ncts_Art, Nothing, AVISO, SND, Now.ToString("yy"), ZOLL_SYSTEM)
AddHandler f.FormClosed, Sub()
initdgvZollAnmeldungen()
End Sub