Tabelle wurde farbig gemacht und Farbcodes pro Status wurden eingeführt

This commit is contained in:
ja
2021-09-17 15:05:45 +02:00
parent d9ec8b2aea
commit 0f1d23ad2e
3 changed files with 91 additions and 6 deletions

View File

@@ -178,8 +178,8 @@
<!-- <input class="form-control mb-4" id="tableSearch" type="text"
placeholder="Einen Begriff eingeben oder den Anfang davon ...">-->
<div id="conovertab" style="overflow-x:auto;"margin-left="-2px">
<asp:Table id="normaltable" runat="server" EnableViewState="false" >
<asp:TableHeaderRow ID="tbl_Header_row" runat="server">
<asp:Table class="table table-responsive table-striped" id="normaltable" runat="server" EnableViewState="false" BorderWidth="2px">
<asp:TableHeaderRow ID="tbl_Header_row" runat="server" BackColor="DarkBlue" ForeColor="White">
<asp:TableHeaderCell ID="tbl_HeaderCellIndexNr" runat="server">Index-Nr</asp:TableHeaderCell>
<asp:TableHeaderCell ID="tbl_HeaderCell_LKWs" runat="server">LKW_Nr</asp:TableHeaderCell>
<asp:TableHeaderCell ID="tbl_HeaderCell_Status" runat="server">Status</asp:TableHeaderCell>

View File

@@ -37,6 +37,88 @@ Partial Class Kundenbereich_Default
VERAG
ZOLL
End Enum
Protected Sub initcells(tr As TableRow, t1 As TableCell, t2 As TableCell, t3 As TableCell, t4 As TableCell, t5 As TableCell, t6 As TableCell, t7 As TableCell, t8 As TableCell, th1 As TableHeaderCell, th2 As TableHeaderCell, th3 As TableHeaderCell, th4 As TableHeaderCell, th5 As TableHeaderCell, th6 As TableHeaderCell, th7 As TableHeaderCell, th8 As TableHeaderCell)
Dim blau As Drawing.Color = Drawing.Color.LightBlue
Dim white As Drawing.Color = Drawing.Color.White
Dim darkgrau As Drawing.Color = Drawing.Color.DarkGray
Dim darkblue = Drawing.Color.FromArgb(4, 51, 129)
tr.BackColor = blau
If t1.Text = "" Then
t1.BackColor = blau
Else
t1.BackColor = blau
End If
If t2.Text = "Erfasst" Then
t2.BackColor = Drawing.Color.DarkGreen
t2.ForeColor = white
ElseIf t2.Text = "Nicht eingetroffen" Then
t2.BackColor = Drawing.Color.DarkRed
t2.ForeColor = white
ElseIf t2.Text = "Ankunft" Then
t2.BackColor = Drawing.Color.Orange
t2.ForeColor = white
ElseIf t2.Text = "Vorbereitet" Then
t2.BackColor = Drawing.Color.OldLace
t2.ForeColor = white
ElseIf t2.Text = "Vorgeschrieben" Then
t2.BackColor = Drawing.Color.DarkGray
t2.ForeColor = white
ElseIf t2.Text = "Undefiniert" Then
t2.BackColor = Drawing.Color.Black
t2.ForeColor = white
Else
t2.BackColor = blau
End If
If t3.Text = "" Then
t3.BackColor = blau
Else
t3.BackColor = blau
End If
If t4.Text = "" Then
t4.BackColor = blau
Else
t4.BackColor = blau
End If
If t5.Text = "" Then
t5.BackColor = blau
Else
t5.BackColor = blau
End If
If t6.Text = "" Then
t6.BackColor = blau
Else
t6.BackColor = blau
End If
If t7.Text = "" Then
t7.BackColor = blau
Else
t7.BackColor = blau
End If
If t8.Text = "" Then
t8.BackColor = blau
Else
t8.BackColor = blau
End If
th1.BackColor = darkblue
th1.ForeColor = white
th2.BackColor = darkblue
th2.ForeColor = white
th3.BackColor = darkblue
th3.ForeColor = white
th4.BackColor = darkblue
th4.ForeColor = white
th5.BackColor = darkblue
th5.ForeColor = white
th6.BackColor = darkblue
th6.ForeColor = white
th7.BackColor = darkblue
th7.ForeColor = white
th8.BackColor = darkblue
End Sub
Protected Sub btn_Auftraege_Click(sender As Object, e As EventArgs)
'MsgBox(Session.Item("test").ToString)
'MsgBox(Session.Item("CustomerID").ToString)
@@ -142,8 +224,10 @@ Partial Class Kundenbereich_Default
Dim tbl_CellLKWs = New TableCell
Dim tbl_CellKundAuftNr = New TableCell
Dim tbl_CellInfo = New TableCell
'tr = New HtmlTableRow()
Dim tr = New TableRow
'tr = New HtmlTableRow()
Dim zahl = i + 1
tbl_CellIndex.Text = zahl
tr.Cells.Add(tbl_CellIndex)
@@ -166,11 +250,11 @@ Partial Class Kundenbereich_Default
Case 5
tbl_CellStatus.Text = "Vorgeschrieben"
tr.Cells.Add(tbl_CellStatus)
Case Else
Case Nothing
tbl_CellStatus.Text = "Undefiniert"
tr.Cells.Add(tbl_CellStatus)
End Select
initcells(tr, tbl_CellIndex, tbl_CellStatus, tbl_Cell_Auftragsdatum, tbl_CellAbsender, tbl_CellEmpfaenger, tbl_CellLKWs, tbl_CellKundAuftNr, tbl_CellInfo, tbl_HeaderCellIndexNr, tbl_HeaderCell_Status, tbl_HeaderCell_Auftragsdatum, tbl_HeaderCell_Absender, tbl_HeaderCell_Empfaenger, tbl_HeaderCell_LKWs, tbl_HeaderCell_KundAuftNr, tbl_HeaderCell_Info)
tbl_Cell_Auftragsdatum.Text = d("AvisoEingang").ToString
tr.Cells.Add(tbl_Cell_Auftragsdatum)
tbl_CellAbsender.Text = d("Auftraggeber").ToString