Hauptfenster
This commit is contained in:
@@ -50,7 +50,9 @@ Public Class usrCntlHauptfenster_Suche_AVISO
|
||||
cboImEx.changeItem("")
|
||||
|
||||
|
||||
|
||||
If gridAviso.RowCount > 0 Then
|
||||
gridAviso.Rows(0).Selected = True
|
||||
End If
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.WARENORT_ZUGANG Then
|
||||
cboMy_Grenzstelle.Items.Clear()
|
||||
@@ -149,6 +151,11 @@ Public Class usrCntlHauptfenster_Suche_AVISO
|
||||
|
||||
End If
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("eAVISO", "AVISO") Then
|
||||
btnE_Aviso.Visible = True
|
||||
Label22.Visible = True
|
||||
initEAviso()
|
||||
End If
|
||||
|
||||
tbcntrAvisoLKW.Width = Panel1.Width
|
||||
|
||||
@@ -981,12 +988,13 @@ Public Class usrCntlHauptfenster_Suche_AVISO
|
||||
End If
|
||||
PARENT_FRMHAUPTFENSTER.Details_anzeigen(VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID)
|
||||
End If
|
||||
If chkFarben Then PARENT_FRMHAUPTFENSTER.GridZeichnenAviso()
|
||||
If chkFarben Then GridZeichnenAviso()
|
||||
Label8.Visible = False
|
||||
lblDauer.Text = "" & hDifferenz.ToString & " ms"
|
||||
|
||||
lblEintraege.Text = gridAviso.RowCount & " Einträge" & If(gridAviso.RowCount = 2000, " (begrenzt)", "")
|
||||
|
||||
initEAviso()
|
||||
|
||||
'lblDauer.Text = "Dauer Anzeige aufbauen: " & hDifferenz.ToString & " ms"
|
||||
End Sub
|
||||
@@ -1093,7 +1101,7 @@ Public Class usrCntlHauptfenster_Suche_AVISO
|
||||
initDat()
|
||||
Aviso_anzeigen("")
|
||||
|
||||
PARENT_FRMHAUPTFENSTER.setAkive_AuswahlID() 'Lädt die aktuelle ID
|
||||
setAkive_AuswahlID() 'Lädt die aktuelle ID
|
||||
If gridAviso.SelectedRows.Count > 0 Then
|
||||
PARENT_FRMHAUPTFENSTER.Details_anzeigen(VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID, False)
|
||||
Else
|
||||
@@ -1454,4 +1462,442 @@ Public Class usrCntlHauptfenster_Suche_AVISO
|
||||
Return addDays
|
||||
End Function
|
||||
|
||||
Private Sub btnNeu_Click(sender As Object, e As EventArgs) Handles btnNeu.Click
|
||||
Try
|
||||
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
gridAviso.ClearSelection()
|
||||
'gridMyAviso.ClearSelection()
|
||||
Dim frmGrayOut = VERAG_PROG_ALLGEMEIN.cMeineFunktionenAVISO.grayoutForm()
|
||||
Dim f As New frmEintragAviso
|
||||
|
||||
If sender Is ToolStripMenuItem17 Then
|
||||
f.FIRMA_TMP = "ATILLA"
|
||||
End If
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = 0
|
||||
' f.frmHilf = Me
|
||||
If Not f.IsDisposed And f IsNot Nothing And Not frmGrayOut.IsDisposed And frmGrayOut IsNot Nothing Then
|
||||
f.ShowDialog(frmGrayOut)
|
||||
End If
|
||||
frmGrayOut.Close()
|
||||
PARENT_FRMHAUPTFENSTER.btnRefresh.PerformClick() 'Aviso_anzeigen("")
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name, "LOG")
|
||||
End Try
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
Private Sub Button12_Click(sender As Object, e As EventArgs) Handles btnE_Aviso.Click, Label22.Click
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Dim f As New frm_eAVISO
|
||||
f.Show()
|
||||
Me.Cursor = Cursors.Default
|
||||
End Sub
|
||||
|
||||
|
||||
Sub initEAviso()
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("eAVISO", "AVISO") Then
|
||||
If VERAGSQL Is Nothing Then VERAGSQL = New VERAG_PROG_ALLGEMEIN.SQL '??
|
||||
Label22.Text = VERAGSQL.getValueTxtBySql("SELECT count(*) FROM [tblNCTS_TR] where ncts_AVISO_einarbeitet=0 AND ncts_Partnersystem='ATEZ'", "FMZOLL") '"XX"
|
||||
If Label22.Text = "0" Then Label22.Text = ""
|
||||
Label22.Visible = Label22.Text <> ""
|
||||
Label22.BringToFront()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub usrCntlHauptfenster_Suche_AVISO_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
|
||||
If (e.KeyCode) = Keys.Add AndAlso e.Control Then
|
||||
btnNeu.PerformClick()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Function setAkive_AuswahlID() As Integer
|
||||
If gridAviso.SelectedRows.Count > 0 Then
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = CInt(gridAviso.Rows(gridAviso.SelectedRows(0).Index).Cells("AvisoID").Value)
|
||||
Else
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = -1
|
||||
End If
|
||||
|
||||
'If gridMyAviso.SelectedRows.Count > 0 Then
|
||||
' VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = CInt(gridMyAviso.Rows(gridMyAviso.SelectedRows(0).Index).Cells("AvisoID").Value)
|
||||
' If Not cbx_My_LKW.Checked Then
|
||||
' VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_SendungsID = CInt(gridMyAviso.Rows(gridMyAviso.SelectedRows(0).Index).Cells("tblSnd_SendungID").Value)
|
||||
' Else
|
||||
' VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_SendungsID = -1
|
||||
|
||||
' End If
|
||||
'Else
|
||||
' VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_SendungsID = -1
|
||||
'End If
|
||||
|
||||
Return VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID
|
||||
End Function
|
||||
|
||||
Public Sub GridZeichnenAviso()
|
||||
'hier wird der Grid speziell designed
|
||||
If gridAviso.RowCount = 0 Then Exit Sub
|
||||
'Falls Kunde auf inaktiv steht, dann wird Zeile ausgegraut angezeigt
|
||||
For Each dr As DataGridViewRow In gridAviso.Rows
|
||||
Select Case VarToInt(dr.Cells("Status").Value)
|
||||
Case 0 'erfasst
|
||||
dr.DefaultCellStyle.SelectionBackColor = Color.FromArgb(230, 0, 0)
|
||||
dr.DefaultCellStyle.ForeColor = Color.FromArgb(230, 0, 0)
|
||||
dr.DefaultCellStyle.SelectionForeColor = Color.White
|
||||
Case 1 'freigegeben
|
||||
dr.DefaultCellStyle.SelectionBackColor = Color.Green
|
||||
dr.DefaultCellStyle.ForeColor = Color.Green
|
||||
dr.DefaultCellStyle.SelectionForeColor = Color.White
|
||||
Case 2 'LKW nicht eingetroffen
|
||||
dr.DefaultCellStyle.SelectionBackColor = Color.Gray
|
||||
dr.DefaultCellStyle.ForeColor = Color.Gray
|
||||
dr.DefaultCellStyle.SelectionForeColor = Color.White
|
||||
Case 3 'Ankunft
|
||||
dr.DefaultCellStyle.SelectionBackColor = Color.Blue
|
||||
dr.DefaultCellStyle.ForeColor = Color.Blue
|
||||
dr.DefaultCellStyle.SelectionForeColor = Color.White
|
||||
Case 4 'Vorbereitet
|
||||
dr.DefaultCellStyle.SelectionBackColor = Color.Brown
|
||||
dr.DefaultCellStyle.ForeColor = Color.Brown
|
||||
dr.DefaultCellStyle.SelectionForeColor = Color.White
|
||||
Case 5 'Vorbereitet
|
||||
dr.DefaultCellStyle.SelectionBackColor = Color.Purple
|
||||
dr.DefaultCellStyle.ForeColor = Color.Purple
|
||||
dr.DefaultCellStyle.SelectionForeColor = Color.White
|
||||
End Select
|
||||
dr.Cells("Status").Style.BackColor = dr.DefaultCellStyle.ForeColor
|
||||
dr.Cells("Status").Style.SelectionForeColor = dr.DefaultCellStyle.ForeColor
|
||||
dr.Cells("LKW_Nr").Style.BackColor = lkwbackcolor
|
||||
'dr.Cells("LKW_Nr").Style.SelectionBackColor = lkwbackcolorSel
|
||||
' dr.Cells("LKW_Nr").Style.SelectionForeColor = Color.Black
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub lblHinweiseVisible()
|
||||
' If gridMyAviso.SelectedRows.Count > 0 Then lblHinweis.Visible = (gridMyAviso.SelectedRows(0).Cells("AvisoTVHinweis").Value.ToString <> "")
|
||||
If gridAviso.SelectedRows.Count > 0 Then lblHinweis.Visible = (gridAviso.SelectedRows(0).Cells("AvisoTVHinweis").Value.ToString <> "")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Sub avisoAktualisierenAktiveIdBehalten(tmpid As Integer, Optional aktWithoutCheckTime As Boolean = False, Optional Aviso_anzeigenBool As Boolean = True)
|
||||
|
||||
PARENT_FRMHAUPTFENSTER.pic.Visible = False
|
||||
Try
|
||||
|
||||
|
||||
If Not Grid_aktiv Then Exit Sub
|
||||
Details_aktiv = False
|
||||
|
||||
|
||||
|
||||
If Aviso_anzeigenBool Then PARENT_FRMHAUPTFENSTER.initsearch("", False)
|
||||
|
||||
|
||||
If AVISO_TYP = "LKW" Then
|
||||
gridAviso.ClearSelection()
|
||||
For Each r As DataGridViewRow In gridAviso.Rows
|
||||
If CInt(r.Cells("AvisoId").Value) = tmpid Then
|
||||
' gridMyAviso.ClearSelection()
|
||||
gridAviso.CurrentCell = r.Cells("Status")
|
||||
r.Selected = True : Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
gridAviso.ClearSelection()
|
||||
If gridAviso.Rows.Count > 0 Then
|
||||
For Each r As DataGridViewRow In gridAviso.Rows
|
||||
If CInt(r.Cells("tblSnd_SendungID").Value) = VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_SendungsID Then
|
||||
gridAviso.CurrentCell = r.Cells("Status")
|
||||
r.Selected = True : Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = tmpid
|
||||
Details_aktiv = True
|
||||
|
||||
If PARENT_FRMHAUPTFENSTER.pnlDetailsRechts.Controls.Count > 0 Then
|
||||
|
||||
Dim usrcntlAvisoID = -1
|
||||
Dim usrcntlAktiv As DateTime
|
||||
If Not PARENT_FRMHAUPTFENSTER.pnlDetailsRechts.Controls(0).GetType = GetType(System.Windows.Forms.Label) Then
|
||||
If PARENT_FRMHAUPTFENSTER.pnlDetailsRechts.Controls(0).Name = "usrcntlAktDetailsATILLANeu" Then
|
||||
usrcntlAvisoID = DirectCast(PARENT_FRMHAUPTFENSTER.pnlDetailsRechts.Controls(0), usrcntlAktDetailsATILLANeu).AvisoID
|
||||
usrcntlAktiv = DirectCast(PARENT_FRMHAUPTFENSTER.pnlDetailsRechts.Controls(0), usrcntlAktDetailsATILLANeu).aktiv
|
||||
Else
|
||||
usrcntlAvisoID = DirectCast(PARENT_FRMHAUPTFENSTER.pnlDetailsRechts.Controls(0), usrcntlAktDetails).AvisoID
|
||||
usrcntlAktiv = DirectCast(PARENT_FRMHAUPTFENSTER.pnlDetailsRechts.Controls(0), usrcntlAktDetails).aktiv
|
||||
End If
|
||||
|
||||
If aktWithoutCheckTime Or usrcntlAvisoID <> tmpid Then
|
||||
PARENT_FRMHAUPTFENSTER.Details_anzeigen(VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID)
|
||||
Else
|
||||
If DateDiff(DateInterval.Second, usrcntlAktiv, Now) > 60 Then 'Wenn die Details länger als 60 Sek inaktiv sind (Prüfung durch click und keydown)
|
||||
PARENT_FRMHAUPTFENSTER.Details_anzeigen(VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name, "LOG")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub grid_CellMouseClick(sender As Object, e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles gridAviso.CellMouseClick
|
||||
|
||||
If e.RowIndex < 0 Then Exit Sub 'Es wurde außerhalb einer gültigen Datenzeile geklickt
|
||||
'If gridVermerke.SelectedRows.Count = 0 Then Exit Sub 'Es wurde außerhalb einer gültigen Datenzeile geklickt
|
||||
'gridMyAviso.ClearSelection() 'WARUM?
|
||||
' If sender Is gridAviso Then gridMyAviso.ClearSelection() : UsrCntlBenachrichtigungen2.gridAvisoBenachrichtigungen.ClearSelection()
|
||||
' If sender Is gridMyAviso Then gridAviso.ClearSelection() : UsrCntlBenachrichtigungen2.gridAvisoBenachrichtigungen.ClearSelection()
|
||||
' MsgBox(Grid_aktiv)
|
||||
DirectCast(sender, DataGridView).Rows(e.RowIndex).Selected = True
|
||||
|
||||
Dim tmpId = CInt(sender.Rows(e.RowIndex).Cells("AvisoId").Value)
|
||||
|
||||
If AVISO_TYP = "SND" Then
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_SendungsID = CInt(gridAviso.Rows(e.RowIndex).Cells("tblSnd_SendungID").Value)
|
||||
Else
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_SendungsID = -1
|
||||
End If
|
||||
|
||||
|
||||
If e.Button = MouseButtons.Right Then
|
||||
If True Then
|
||||
'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "ATILLA" Then
|
||||
' If sender Is gridAviso Then
|
||||
' VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = tmpId
|
||||
' sender.CurrentCell = sender.Rows(e.RowIndex).Cells(e.ColumnIndex)
|
||||
' conMenuAviso.Show(Cursor.Position)
|
||||
' End If
|
||||
'Else
|
||||
setAkive_AuswahlID()
|
||||
avisoAktualisierenAktiveIdBehalten(tmpId, , False)
|
||||
Dim hStatus = AvisoDAL.LesenAviso(tmpId, "").Status
|
||||
If hStatus <> VERAG_PROG_ALLGEMEIN.cGlobal.Status_Ankunft And hStatus <> VERAG_PROG_ALLGEMEIN.cGlobal.Status_Vorgeschrieben And hStatus <> VERAG_PROG_ALLGEMEIN.cGlobal.Status_Erfasst And hStatus <> VERAG_PROG_ALLGEMEIN.cGlobal.Status_Vorbereitet Then
|
||||
'MsgBox("Ein Vermerk kann nur erfasst werden, wenn der Status des Aviso auf 'Erfasst', 'Vorbereitet', 'Vorgeschrieben' oder 'Ankunft' steht.", vbInformation)
|
||||
PARENT_FRMHAUPTFENSTER.lblErrVermerk.Width = 300
|
||||
PARENT_FRMHAUPTFENSTER.lblErrVermerk.Visible = True
|
||||
' PARENT_FRMHAUPTFENSTER.hideErr.Enabled = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim frmGrayOut = VERAG_PROG_ALLGEMEIN.cMeineFunktionenAVISO.grayoutForm()
|
||||
Dim sv As New frmAddAktenvermerkShort(tmpId)
|
||||
sv.Location = Me.PointToClient(Cursor.Position)
|
||||
' sv.ShowDialog()
|
||||
sv.ShowDialog(frmGrayOut)
|
||||
frmGrayOut.Close()
|
||||
|
||||
End If
|
||||
ElseIf e.Button = MouseButtons.Left Then
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = tmpId
|
||||
avisoAktualisierenAktiveIdBehalten(tmpId, , False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub gridAviso_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles gridAviso.CellContentClick
|
||||
Try
|
||||
If e.RowIndex > 0 Then
|
||||
|
||||
' MsgBox(gridMyAviso.Columns(e.ColumnIndex).Name)
|
||||
If AVISO_TYP = "SND" Then
|
||||
If True Then 'gridMyAviso.SelectedRows.Count = 1 Then
|
||||
Dim SendungsId = gridAviso.Rows(e.RowIndex).Cells("tblSnd_SendungID").Value
|
||||
Dim AvisoID = gridAviso.Rows(e.RowIndex).Cells("AvisoID").Value
|
||||
If SendungsId > 0 And AvisoID > 0 Then
|
||||
|
||||
Select Case gridAviso.Columns(e.ColumnIndex).Name
|
||||
|
||||
Case "StatusVorgeschrieben"
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
If FUNC.setSendungVorgeschrieben(SendungsId, AvisoID) Then
|
||||
avisoAktualisierenAktiveIdBehalten(AvisoID, True, True) 'Aviso_anzeigen("")
|
||||
End If
|
||||
Me.Cursor = Cursors.Default
|
||||
Case "StatusVorbereitetQS"
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
If FUNC.setSendungVorbereitetQS(SendungsId, AvisoID) Then
|
||||
avisoAktualisierenAktiveIdBehalten(AvisoID, True, True) 'Aviso_anzeigen("")
|
||||
End If
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub gridAviso_ColumnHeaderMouseClick(sender As Object, e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles gridAviso.ColumnHeaderMouseClick
|
||||
GridZeichnenAviso()
|
||||
End Sub
|
||||
|
||||
Private Sub gridAviso_CellPainting(sender As Object, e As DataGridViewCellPaintingEventArgs) Handles gridAviso.CellPainting
|
||||
If e.RowIndex <> -1 AndAlso gridAviso.Columns(e.ColumnIndex).Name = "Status" Then
|
||||
If gridAviso.Rows(e.RowIndex).Cells("Transportmittelart").Value = "SPRINTER" Then
|
||||
If (e.PaintParts And DataGridViewPaintParts.Background) <> DataGridViewPaintParts.None Then
|
||||
e.Graphics.DrawImage(My.Resources.sprinter_white, e.CellBounds)
|
||||
'e.CellStyle.BackColor = Color.White
|
||||
End If
|
||||
|
||||
|
||||
If Not e.Handled Then
|
||||
e.Handled = True
|
||||
e.PaintContent(e.CellBounds)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub gridAviso_CellFormatting(sender As Object, e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles gridAviso.CellFormatting
|
||||
'Anzahl Minuten als verständlichen Text anzeigen
|
||||
|
||||
If AVISO_TYP = "LKW" Then
|
||||
Select Case gridAviso.Columns(e.ColumnIndex).Name
|
||||
Case "Status" 'Status
|
||||
Select Case VarToInt(e.Value)
|
||||
Case 0 : e.Value = "Erfasst"
|
||||
Case 1 : e.Value = "Freigegeben"
|
||||
Case 2 : e.Value = "LKW n.e."
|
||||
Case 3 : e.Value = "Ankunft"
|
||||
Case 4 : e.Value = "Vorbereitet"
|
||||
Case 5 : e.Value = "Vorgeschrieben"
|
||||
Case VERAG_PROG_ALLGEMEIN.cGlobal.Status_ATILLA_INDONESIEN : e.Value = "An Indonesien"
|
||||
Case VERAG_PROG_ALLGEMEIN.cGlobal.Status_ATILLA_VERIMEX : e.Value = "An Verimex"
|
||||
Case Else : e.Value = "unbekannt"
|
||||
End Select
|
||||
|
||||
Case "AvisoEingang" 'Aviso-Eingang
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Datum" 'Aviso-Eingang
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Erfasst" 'Aviso-Eingang
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Vorbereitet" 'Vorbereitet
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Vorgeschrieben" 'Vorgeschrieben
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Ankunft" 'Ankunft
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Freigabe" 'Abfahrt
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Dauer" 'Dauer
|
||||
|
||||
If VarToInt(e.Value) > 120 Then
|
||||
gridAviso.Rows(e.RowIndex).Cells("Dauer").Style.ForeColor = Color.Red
|
||||
End If
|
||||
If VarToInt(e.Value) = 0 Then
|
||||
e.Value = ""
|
||||
Else
|
||||
e.Value = Minuten_auf_Text(VarToLng(e.Value))
|
||||
End If
|
||||
Case "VoraussichtlichesEintreffen"
|
||||
' "Der Operator = ist für Typ DBNull und Typ Date nicht definiert."
|
||||
|
||||
If (gridAviso.Rows(e.RowIndex).Cells("Ankunft").Value Is DBNull.Value OrElse gridAviso.Rows(e.RowIndex).Cells("Ankunft").Value = LeerDatum) AndAlso gridAviso.Rows(e.RowIndex).Cells("TageBisEintreffen").Value IsNot DBNull.Value AndAlso gridAviso.Rows(e.RowIndex).Cells("TageBisEintreffen").Value <= 1 Then
|
||||
'gridAviso.Rows(e.RowIndex).Cells("VoraussichtlichesEintreffen").Style.ForeColor = Color.Red
|
||||
gridAviso.Rows(e.RowIndex).Cells("VoraussichtlichesEintreffen").Style.Font = New Font(Me.Font.FontFamily, Me.Font.Size, FontStyle.Bold)
|
||||
End If
|
||||
End Select
|
||||
|
||||
Else
|
||||
Try
|
||||
|
||||
|
||||
If gridAviso Is Nothing Then Exit Sub
|
||||
If gridAviso.Columns Is Nothing Then Exit Sub
|
||||
If gridAviso.ColumnCount = 0 Then Exit Sub
|
||||
|
||||
|
||||
'Anzahl Minuten als verständlichen Text anzeigen
|
||||
Select Case gridAviso.Columns(e.ColumnIndex).Name
|
||||
Case "Status" 'Status
|
||||
|
||||
'Dim vb As Boolean = gridAviso.Rows(e.RowIndex).Cells("statVorb").Value
|
||||
'Select Case VarToInt(e.Value)
|
||||
' Case 0 : e.Value = IIf(vb, "Erfasst (in VB)", "Erfasst") : gridAviso.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.FromArgb(60, 60, 60)
|
||||
' Case 1 : e.Value = IIf(vb, "Freigegeben (in VB)", "Freigegeben")
|
||||
' Case 2 : e.Value = IIf(vb, "LKW n.e. (in VB)", "LKW n.e.")
|
||||
' Case 3 : e.Value = IIf(vb, "Ankunft (in VB)", "Ankunft") : gridAviso.Rows(e.RowIndex).DefaultCellStyle.Font = New Font(gridAviso.Font.FontFamily, gridAviso.Font.Size, FontStyle.Bold) 'New Font(gridAviso.DefaultCellStyle.Font, 8.0F)
|
||||
' Case 4 : e.Value = IIf(vb, "Vorber. (in VB)", "Vorbereitet")
|
||||
' Case 5 : e.Value = IIf(vb, "Vorg. (in VB)", "Vorgeschrieben")
|
||||
' ' Case 99 : e.Value = "in Vorbereitung" : gridAviso.Rows(e.RowIndex).DefaultCellStyle.Font = New Font(gridAviso.Font.FontFamily, gridAviso.Font.Size, FontStyle.Bold) 'New Font(gridAviso.DefaultCellStyle.Font, 8.0F)
|
||||
' 'gridAviso.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Brown
|
||||
' ' gridAviso.Rows(e.RowIndex).Cells("Status").Style.Font = New Font(gridAviso.Font.FontFamily, gridAviso.Font.Size, FontStyle.Bold) 'New Font(gridAviso.DefaultCellStyle.Font, 8.0F)
|
||||
' Case Else : e.Value = "unbekannt"
|
||||
'End Select
|
||||
|
||||
Select Case VarToInt(e.Value)
|
||||
Case 0 : e.Value = "Erfasst" : gridAviso.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.FromArgb(60, 60, 60)
|
||||
Case 1 : e.Value = "Freigegeben"
|
||||
Case 2 : e.Value = "LKW n.e."
|
||||
Case 3 : e.Value = "Ankunft" : gridAviso.Rows(e.RowIndex).Cells("Status").Style.Font = New Font(gridAviso.Font.FontFamily, gridAviso.Font.Size, FontStyle.Bold) 'New Font(gridAviso.DefaultCellStyle.Font, 8.0F)
|
||||
Case 4 : e.Value = "Vorbereitet"
|
||||
Case 5 : e.Value = "Vorgeschrieben"
|
||||
Case VERAG_PROG_ALLGEMEIN.cGlobal.Status_ATILLA_INDONESIEN : e.Value = "An Indonesien"
|
||||
Case VERAG_PROG_ALLGEMEIN.cGlobal.Status_ATILLA_VERIMEX : e.Value = "An Verimex"
|
||||
' Case 99 : e.Value = "in Vorbereitung" : gridAviso.Rows(e.RowIndex).DefaultCellStyle.Font = New Font(gridAviso.Font.FontFamily, gridAviso.Font.Size, FontStyle.Bold) 'New Font(gridAviso.DefaultCellStyle.Font, 8.0F)
|
||||
'gridAviso.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Brown
|
||||
' gridAviso.Rows(e.RowIndex).Cells("Status").Style.Font = New Font(gridAviso.Font.FontFamily, gridAviso.Font.Size, FontStyle.Bold) 'New Font(gridAviso.DefaultCellStyle.Font, 8.0F)
|
||||
Case Else : e.Value = "unbekannt"
|
||||
End Select
|
||||
|
||||
' If gridAviso.Rows(e.RowIndex).Cells("statVorb").Value = "1" Then
|
||||
'e.Value &= " (VB)"
|
||||
' End If
|
||||
|
||||
Case "AvisoEingang" 'Aviso-Eingang
|
||||
If VarToDate(e.Value) = LeerDatum Then e.Value = ""
|
||||
|
||||
Case "Ankunft" 'Ankunft
|
||||
If VarToDate(e.Value) = LeerDatum Then
|
||||
e.Value = ""
|
||||
Else
|
||||
' If DateDiff(DateInterval.Minute, CDate(VarToDate(e.Value)), Now) > 120 Then
|
||||
' 'gridAviso.Rows(e.RowIndex).DefaultCellStyle.ForeColor = Color.Red
|
||||
' gridAviso.Rows(e.RowIndex).Cells("Dauer").Style.ForeColor = Color.Red
|
||||
' gridAviso.Rows(e.RowIndex).Cells("Ankunft").Style.ForeColor = Color.Red
|
||||
' End If
|
||||
End If
|
||||
End Select
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user