Imports System.Data Imports System.Web.UI.HtmlControls Partial Class Kundenbereich_Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load tbl_Header_row.TableSection = TableRowSection.TableHeader DataBind() If (Page.IsPostBack And normaltable.EnableViewState = False) Then normaltable.EnableViewState = True End If End Sub Protected Sub LogOutBtn1_Click(sender As Object, e As EventArgs) Response.Redirect("../login/Logout.aspx", True) End Sub Protected Sub LogOutBtn2_Click(sender As Object, e As EventArgs) Response.Redirect("../login/Logout.aspx", True) End Sub Dim datevon As DateTime Dim datebis As DateTime Dim Kdnrtext As String Dim Absender As String = "" Dim Empfaenger As String = "" Dim LKWNR As String = "" Dim KDNAFNR As String = "" Dim dt As DataTable Enum ART Kunde AVISIERER Frächter 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 schwarz As Drawing.Color = Drawing.Color.Black 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 t1.ForeColor = schwarz Else t1.BackColor = blau t1.ForeColor = schwarz End If If t2.Text = "Erfasst" Then t2.BackColor = Drawing.Color.HotPink t2.ForeColor = white ElseIf t2.Text = "Nicht eingetroffen" Then t2.BackColor = Drawing.Color.Black t2.ForeColor = white ElseIf t2.Text = "Ankunft" Then t2.BackColor = Drawing.Color.DarkBlue t2.ForeColor = white ElseIf t2.Text = "Vorbereitet" Then t2.BackColor = System.Drawing.Color.Brown t2.ForeColor = white ElseIf t2.Text = "Vorgeschrieben" Then t2.BackColor = Drawing.Color.Purple t2.ForeColor = white ElseIf t2.Text = "Freigabe" Then t2.BackColor = Drawing.Color.DarkOliveGreen t2.ForeColor = white ElseIf t2.Text = "Undefiniert" Then t2.BackColor = Drawing.Color.DarkGray t2.ForeColor = white Else t2.BackColor = blau t2.ForeColor = schwarz End If If t3.Text = "" Then t3.BackColor = blau t3.ForeColor = schwarz Else t3.BackColor = blau t3.ForeColor = schwarz End If If t4.Text = "" Then t4.BackColor = blau t4.ForeColor = schwarz Else t4.BackColor = blau t4.ForeColor = schwarz End If If t5.Text = "" Then t5.BackColor = blau t5.ForeColor = schwarz Else t5.BackColor = blau t5.ForeColor = schwarz End If If t6.Text = "" Then t6.BackColor = blau t6.ForeColor = schwarz Else t6.BackColor = blau t6.ForeColor = schwarz End If If t7.Text = "" Then t7.BackColor = blau t7.ForeColor = schwarz Else t7.BackColor = blau t7.ForeColor = schwarz End If If t8.Text = "" Then t8.BackColor = blau t8.ForeColor = schwarz Else t8.BackColor = blau t8.ForeColor = schwarz End If th1.Font.Bold = True th1.BackColor = darkblue th1.ForeColor = white th2.Font.Bold = True th2.BackColor = darkblue th2.ForeColor = white th3.Font.Bold = True th3.BackColor = darkblue th3.ForeColor = white th4.Font.Bold = True th4.BackColor = darkblue th4.ForeColor = white th5.Font.Bold = True th5.BackColor = darkblue th5.ForeColor = white th6.Font.Bold = True th6.BackColor = darkblue th6.ForeColor = white th7.Font.Bold = True th7.BackColor = darkblue th7.ForeColor = white th8.Font.Bold = True th8.BackColor = darkblue th8.ForeColor = white End Sub Protected Sub btn_Auftraege_Click(sender As Object, e As EventArgs) 'MsgBox(Session.Item("test").ToString) 'MsgBox(Session.Item("CustomerID").ToString) 'MsgBox(Session.Item("PW").ToString) Kdnrtext = Session.Item("CustomerID").ToString dt = Nothing If txt_Absender.Text IsNot "" Or txt_Absender_M.Text IsNot "" Then txt_Absender.ValidateRequestMode = UI.ValidateRequestMode.Enabled Absender = txt_Absender.Text txt_Absender_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled Absender = txt_Absender_M.Text ElseIf txt_Empfaenger.Text IsNot "" Or txt_Empfaenger_M.Text IsNot "" Then txt_Empfaenger.ValidateRequestMode = UI.ValidateRequestMode.Enabled Empfaenger = txt_Empfaenger.Text txt_Empfaenger_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled Empfaenger = txt_Empfaenger_M.Text ElseIf txt_KdNrAuftrag.Text IsNot "" Or txt_KdNrAuftrag_M.Text IsNot "" Then txt_KdNrAuftrag.ValidateRequestMode = UI.ValidateRequestMode.Enabled KDNAFNR = txt_KdNrAuftrag.Text txt_KdNrAuftrag_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled KDNAFNR = txt_KdNrAuftrag_M.Text ElseIf txt_LKWNr.Text IsNot "" Or txt_LKWNr_M.Text IsNot "" Then txt_LKWNr.ValidateRequestMode = UI.ValidateRequestMode.Enabled LKWNR = txt_LKWNr.Text txt_LKWNr_M.ValidateRequestMode = UI.ValidateRequestMode.Enabled LKWNR = txt_LKWNr_M.Text End If 'Dim tr If rbt_Alle.Selected = True Or rbt_Alle_M.Selected = True Then If Date.Parse(pickdate2.Text) > Date.Parse(pickdate1.Text) Then Try datevon = Date.Parse(pickdate1.Text) datebis = Date.Parse(pickdate2.Text) Catch ex As Exception MsgBox(ex.StackTrace, MsgBoxStyle.Exclamation) End Try End If dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {0, 1, 2, 3, 4, 5}, datevon, datebis, Absender, Empfaenger, LKWNR, KDNAFNR) ElseIf rbt_Erf.Selected = True Or rbt_Erf_M.Selected Then dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {0},,, Absender, Empfaenger, LKWNR, KDNAFNR) ElseIf rbt_Freig.Selected = True Or rbt_Freig_M.Selected = True Then If Date.Parse(pickdate2.Text) > Date.Parse(pickdate1.Text) Then Try pickdate1.ValidateRequestMode = UI.ValidateRequestMode.Enabled datevon = Date.Parse(pickdate1.Text) pickdate2.ValidateRequestMode = UI.ValidateRequestMode.Enabled datebis = Date.Parse(pickdate2.Text) Catch ex As Exception MsgBox(ex.StackTrace, MsgBoxStyle.Exclamation) End Try ElseIf pickdate1.Text = "TT.MM.JJJJ" And pickdate2.Text = "TT.MM.JJJJ" Then MsgBox("Bitte ein Datum auswählen!", MsgBoxStyle.Information, "Information!") Else dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {1}, Date.ParseExact("01-MM-yyyy", "dd-MM-yyyy", Nothing), Date.Now) End If dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {1}, datevon, datebis, Absender, Empfaenger, LKWNR, KDNAFNR) ElseIf rbt_Ankunft.Selected = True Or rbt_Ankunft_M.Selected = True Then dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {3},,, Absender, Empfaenger, LKWNR, KDNAFNR) ElseIf rbt_Vorb.Selected = True Or rbt_Vorb_M.Selected = True Then dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {4},,, Absender, Empfaenger, LKWNR, KDNAFNR) ElseIf rbt_Vorg.Selected = True Or rbt_Vorg_M.Selected = True Then dt = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {5},,, Absender, Empfaenger, LKWNR, KDNAFNR) End If If dt IsNot Nothing Then Dim i As Integer = 0 'Dim sb As StringBuilder = New StringBuilder() 'Table start. 'sb.Append("
| " _ ' + (column.ColumnName + " | "))) 'Next 'sb.Append("
|---|
| " _ ' + (row(column.ColumnName).ToString + " | "))) ' Next ' sb.Append("