Änderungen

This commit is contained in:
ja
2021-09-08 17:04:53 +02:00
parent 03f6dc7843
commit af286def41
2 changed files with 248 additions and 59 deletions

View File

@@ -8,6 +8,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1" title="Verag Spedition AG AvisoTV Flex"/>
<link rel="shortcut icon" href="../images/Icons/favicon/favicon.ico" />
<style>
@@ -73,23 +75,38 @@
<asp:RadioButton ID="rbt_Freig" runat="server" Text="Freigabe" onclick="rbt_Freig_Click"/>
<asp:Calendar id="pickdate1" runat="server"></asp:Calendar>
<asp:Calendar id="pickdate2" runat="server"></asp:Calendar>
<asp:Calendar id="pickdate2" runat="server"></asp:Calendar>
<!-- Optionale Suchparameter-->
<asp:Label ID="lbl_Absender" runat="server" Text="Absender"></asp:Label>
<asp:TextBox ID="txt_Absender" runat="server" ></asp:TextBox>
<asp:Label ID="lbl_Empfaenger" runat="server" Text="Empfänger"></asp:Label>
<asp:TextBox ID="txt_Empfaenger" runat="server" ></asp:TextBox>
<asp:Label ID="lbl_LKWNr" runat="server" Text="LKW Nr"></asp:Label>
<asp:TextBox ID="txt_LKWNr" runat="server" ></asp:TextBox>
<asp:Label ID="lbl_KdNrAuftrag" runat="server" Text="Kunden Auftrags Nr"></asp:Label>
<asp:TextBox ID="txt_KdNrAuftrag" runat="server" ></asp:TextBox>
<asp:Button ID="btn_Auftraege" runat="server" Text="Erhalte Aufträge" OnClick="btn_Auftraege_Click" />
<input class="form-control mb-4" id="tableSearch" type="text"
placeholder="Einen Begriff eingeben oder den Anfang davon ...">
<div id="conovertab">
<table class="table table-hover" id="normaltable" border="0" cellspacing="0" contenteditable="false" style="width:1250px" >
<th style="height:/*20px;*/ 1.56128024980484vh; /*background-color:#043381;*/ background-image: linear-gradient(to right, #003680 , #0055cc); color:#fff; font-weight:900;">
<tr><th>Auswahl</th><th>Index-Nr</th><!--<th>ART</th>--><th>KundenNr</th><th>Status</th><th>Von</th><th>Bis</th><th>Absender</th><th>Empfänger</th><th>LKW_Nr</th><th>Kunden-AuftragsNr</th><th>Info</th></tr>
</th>
<!-- <table class="table" id="normaltable" border="0" cellspacing="0" contenteditable="false" style="width:1250px" >
<tr style="height:/*20px;*/ 1.56128024980484vh; /*background-color:#043381;*/ background-image: linear-gradient(to right, #003680 , #0055cc); color:#fff; font-weight:900;">
<tr><th>Auswahl</th><th>Index-Nr</th><!--<th>ART</th>--><!--<th>KundenNr</th><th>Status</th><th>von</th><th>bis</th><th>Absender</th><th>Empfänger</th><th>LKW_Nr</th><th>Kunden-AuftragsNr</th><th>Info</th></tr>
</tr>
<!-- <tbody id="myTable">
<tr><td><asp:CheckBox ID="CheckBox9" runat="server" /></td><td>1</td><td>PAN WE 231</td><td>SUBEN</td><td>TESTFRÄCHTER</td><td>2 Pck Teer</td><td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15" /></button></center></td></tr>
<tr><td><asp:CheckBox ID="CheckBox10" runat="server" /></td><td>2</td><td>SME IE 889</td><td>SUBEN</td><td>TESTFRÄCHTER</td><td>2 Pck Kaugummis</td><td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub2"><img src="../images/Icons/service/hilfe.png" width="15" height="15" /></button></center></td></tr>
</tbody> -->
</table>
</tbody>
</table>-->
<asp:Literal ID = "ltTable" runat = "server" />
</div>
<br /><br /><br />
<% End If

View File

@@ -1,4 +1,5 @@

Imports System.Data
Imports System.Web.UI.HtmlControls
Partial Class Kundenbereich_Default
@@ -17,116 +18,271 @@ Partial Class Kundenbereich_Default
Session.Abandon()
Response.Redirect("../newpageJulius_Sidebar.aspx", True)
End Sub
Dim dt0, dt1, dt3, dt4, dt5
Dim dt0, dt1, dt3, dt4, dt5, dt6
Dim dtmain As DataTable = New DataTable
Protected Sub btn_Auftraege_Click(sender As Object, e As EventArgs)
Dim Kdnrtext = txt_KdNr.Text
Dim datevon As Date = pickdate1.SelectedDate
Dim datebis As Date = pickdate2.SelectedDate
Dim datevon As Date
Dim datebis As Date
Try
datevon = pickdate1.SelectedDate
datebis = pickdate2.SelectedDate
Catch
datevon = DateValue(Date.Now.ToString("01.MM.yyyy"))
datebis = DateValue(Date.Now)
End Try
If rbt_Erf.Checked = True Then
dt0 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {0}, datevon, datebis)
Dim i As Integer = 0
dt0 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {0})
dtmain.Columns.AddRange(New DataColumn() {New DataColumn("Auswahl", GetType(CheckBox)), New DataColumn("Index-Nr", GetType(System.Int32)), New DataColumn("ART", GetType(System.String)), New DataColumn("KundenNr", GetType(System.Int32)), New DataColumn("Status", GetType(System.String)), New DataColumn("Von", GetType(System.DateTime)), New DataColumn("Bis", GetType(System.DateTime)), New DataColumn("Absender", GetType(System.String)), New DataColumn("Empfänger", GetType(System.DateTime)), New DataColumn("LKW_Nr", GetType(System.String)), New DataColumn("KdAuftragsNr", GetType(System.String))})
Dim i As Integer = 1
For Each d In dt0.Rows
Dim tr As HtmlTableRow = New HtmlTableRow()
tr.Cells.Add(New HtmlTableCell(<td><CheckBox ID="CheckBox1" runat="server"/></td>))
tr.Cells.Add(New HtmlTableCell(i))
'tr.Cells.Add(New HtmlTableCell(d(Nothing)))
tr.Cells.Add(New HtmlTableCell(Kdnrtext))
tr.Cells.Add(New HtmlTableCell(d("Status")))
tr.Cells.Add(New HtmlTableCell(d("von")))
tr.Cells.Add(New HtmlTableCell(d("bis")))
tr.Cells.Add(New HtmlTableCell(d("Absender")))
tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
'tr.Cells.Add(New HtmlTableCell(d("von")))
'tr.Cells.Add(New HtmlTableCell(d("bis")))
'tr.Cells.Add(New HtmlTableCell(d("Absender")))
'tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
tr.Cells.Add(New HtmlTableCell(d("LKW_Nr")))
tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
'tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
tr.Cells.Add(New HtmlTableCell(<td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15"/></button></center></td>))
dtmain.Rows.Add(tr)
Dim sb As StringBuilder = New StringBuilder()
'Table start.
sb.Append("<table cellpadding='5' cellspacing='0' style='border: 1px solid #ccc;font-size: 9pt;font-family:Arial'>")
'Adding HeaderRow.
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<th style='background-color: #B8DBFD;border: 1px solid #ccc'>" _
+ (column.ColumnName + "</th>")))
Next
sb.Append("</tr>")
'Adding DataRow.
For Each row As DataRow In dtmain.Rows
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<td style='width:100px;border: 1px solid #ccc'>" _
+ (row(column.ColumnName).ToString + "</td>")))
Next
sb.Append("</tr>")
Next
'Table end.
sb.Append("</table>")
ltTable.Text = sb.ToString
i = i + 1
Next
ElseIf rbt_Freig.Checked = True Then
dt1 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {1}, datevon, datebis)
Dim i As Integer = 0
dt1 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {1}, pickdate1.SelectedDate, pickdate2.SelectedDate)
dtmain.Columns.AddRange(New DataColumn() {New DataColumn("Auswahl", GetType(CheckBox)), New DataColumn("Index-Nr", GetType(System.Int32)), New DataColumn("ART", GetType(System.String)), New DataColumn("KundenNr", GetType(System.Int32)), New DataColumn("Status", GetType(System.String)), New DataColumn("Von", GetType(System.DateTime)), New DataColumn("Bis", GetType(System.DateTime)), New DataColumn("Absender", GetType(System.String)), New DataColumn("Empfänger", GetType(System.DateTime)), New DataColumn("LKW_Nr", GetType(System.String)), New DataColumn("KdAuftragsNr", GetType(System.String))})
Dim i As Integer = 1
For Each d In dt1.Rows
Dim tr As HtmlTableRow = New HtmlTableRow()
tr.Cells.Add(New HtmlTableCell(<td><CheckBox ID="CheckBox2" runat="server"/></td>))
tr.Cells.Add(New HtmlTableCell(i))
'tr.Cells.Add(New HtmlTableCell(d(Nothing)))
tr.Cells.Add(New HtmlTableCell(Kdnrtext))
tr.Cells.Add(New HtmlTableCell(d("Status")))
tr.Cells.Add(New HtmlTableCell(d("von")))
tr.Cells.Add(New HtmlTableCell(d("bis")))
tr.Cells.Add(New HtmlTableCell(d("Absender")))
tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
'tr.Cells.Add(New HtmlTableCell(d("von")))
'tr.Cells.Add(New HtmlTableCell(d("bis")))
'tr.Cells.Add(New HtmlTableCell(d("Absender")))
'tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
tr.Cells.Add(New HtmlTableCell(d("LKW_Nr")))
tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
'tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
tr.Cells.Add(New HtmlTableCell(<td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15"/></button></center></td>))
dtmain.Rows.Add(tr)
Dim sb As StringBuilder = New StringBuilder()
'Table start.
sb.Append("<table cellpadding='5' cellspacing='0' style='border: 1px solid #ccc;font-size: 9pt;font-family:Arial'>")
'Adding HeaderRow.
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<th style='background-color: #B8DBFD;border: 1px solid #ccc'>" _
+ (column.ColumnName + "</th>")))
Next
sb.Append("</tr>")
'Adding DataRow.
For Each row As DataRow In dtmain.Rows
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<td style='width:100px;border: 1px solid #ccc'>" _
+ (row(column.ColumnName).ToString + "</td>")))
Next
sb.Append("</tr>")
Next
'Table end.
sb.Append("</table>")
ltTable.Text = sb.ToString
i = i + 1
Next
ElseIf rbt_Ankunft.Checked = True Then
dt3 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {3})
Dim i As Integer = 0
'dtmain.Columns.AddRange(New DataColumn() {New DataColumn("Auswahl", GetType(CheckBox)), New DataColumn("Index-Nr", GetType(System.Int32)), New DataColumn("ART", GetType(System.String)), New DataColumn("KundenNr", GetType(System.Int32)), New DataColumn("Status", GetType(System.String)), New DataColumn("Von", GetType(System.DateTime)), New DataColumn("Bis", GetType(System.DateTime)), New DataColumn("Absender", GetType(System.String)), New DataColumn("Empfänger", GetType(System.DateTime)), New DataColumn("LKW_Nr", GetType(System.String)), New DataColumn("KdAuftragsNr", GetType(System.String)), New DataColumn("KdAuftragsNr", GetType(Button))})
Dim i As Integer = 1
For Each d In dt3.Rows
Dim tr As HtmlTableRow = New HtmlTableRow()
tr.Cells.Add(New HtmlTableCell(<td><CheckBox ID="CheckBox3" runat="server"/></td>))
tr.Cells.Add(New HtmlTableCell(i))
'tr.Cells.Add(New HtmlTableCell(d("")))
tr.Cells.Add(New HtmlTableCell(Kdnrtext))
'tr.Cells.Add(New HtmlTableCell(d(Nothing)))
tr.Cells.Add(New HtmlTableCell(d("Status")))
'tr.Cells.Add(New HtmlTableCell(Nothing))
'tr.Cells.Add(New HtmlTableCell(Nothing))
tr.Cells.Add(New HtmlTableCell(d("Absender")))
tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
'tr.Cells.Add(New HtmlTableCell(d("von")))
'tr.Cells.Add(New HtmlTableCell(d("bis")))
'tr.Cells.Add(New HtmlTableCell(d("Absender")))
'tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
tr.Cells.Add(New HtmlTableCell(d("LKW_Nr")))
tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
tr.Cells.Add(New HtmlTableCell(<td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15"/></button></center></td>))
'tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
tr.Cells.Add(New HtmlTableCell(<button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15"/></button>))
dtmain.Rows.Add(tr)
Dim sb As StringBuilder = New StringBuilder()
'Table start.
sb.Append("<table cellpadding='5' cellspacing='0' style='border: 1px solid #ccc;font-size: 9pt;font-family:Arial'>")
'Adding HeaderRow.
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<th style='background-color: #B8DBFD;border: 1px solid #ccc'>" _
+ (column.ColumnName + "</th>")))
Next
sb.Append("</tr>")
'Adding DataRow.
For Each row As DataRow In dtmain.Rows
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<td style='width:100px;border: 1px solid #ccc'>" _
+ (row(column.ColumnName).ToString + "</td>")))
Next
sb.Append("</tr>")
Next
'Table end.
sb.Append("</table>")
ltTable.Text = sb.ToString
i = i + 1
Next
ElseIf rbt_Vorb.Checked = True Then
dt4 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {4})
Dim i As Integer = 0
dtmain.Columns.AddRange(New DataColumn() {New DataColumn("Auswahl", GetType(CheckBox)), New DataColumn("Index-Nr", GetType(System.Int32)), New DataColumn("ART", GetType(System.String)), New DataColumn("KundenNr", GetType(System.Int32)), New DataColumn("Status", GetType(System.String)), New DataColumn("Von", GetType(System.DateTime)), New DataColumn("Bis", GetType(System.DateTime)), New DataColumn("Absender", GetType(System.String)), New DataColumn("Empfänger", GetType(System.DateTime)), New DataColumn("LKW_Nr", GetType(System.String)), New DataColumn("KdAuftragsNr", GetType(System.String))})
Dim i As Integer = 1
For Each d In dt4.Rows
Dim tr As HtmlTableRow = New HtmlTableRow()
tr.Cells.Add(New HtmlTableCell(<td><CheckBox ID="CheckBox4" runat="server"/></td>))
tr.Cells.Add(New HtmlTableCell(i))
'tr.Cells.Add(New HtmlTableCell(d(Nothing)))
tr.Cells.Add(New HtmlTableCell(Kdnrtext))
tr.Cells.Add(New HtmlTableCell(d("Status")))
'tr.Cells.Add(New HtmlTableCell(Nothing))
'tr.Cells.Add(New HtmlTableCell(Nothing))
tr.Cells.Add(New HtmlTableCell(d("Absender")))
tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
'tr.Cells.Add(New HtmlTableCell(d("von")))
'tr.Cells.Add(New HtmlTableCell(d("bis")))
'tr.Cells.Add(New HtmlTableCell(d("Absender")))
'tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
tr.Cells.Add(New HtmlTableCell(d("LKW_Nr")))
tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
'tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
tr.Cells.Add(New HtmlTableCell(<td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15"/></button></center></td>))
dtmain.Rows.Add(tr)
Dim sb As StringBuilder = New StringBuilder()
'Table start.
sb.Append("<table cellpadding='5' cellspacing='0' style='border: 1px solid #ccc;font-size: 9pt;font-family:Arial'>")
'Adding HeaderRow.
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<th style='background-color: #B8DBFD;border: 1px solid #ccc'>" _
+ (column.ColumnName + "</th>")))
Next
sb.Append("</tr>")
'Adding DataRow.
For Each row As DataRow In dtmain.Rows
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<td style='width:100px;border: 1px solid #ccc'>" _
+ (row(column.ColumnName).ToString + "</td>")))
Next
sb.Append("</tr>")
Next
'Table end.
sb.Append("</table>")
ltTable.Text = sb.ToString
i = i + 1
Next
ElseIf rbt_Vorg.Checked = True Then
dt5 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext, {5})
Dim i As Integer = 0
dtmain.Columns.AddRange(New DataColumn() {New DataColumn("Auswahl", GetType(CheckBox)), New DataColumn("Index-Nr", GetType(System.Int32)), New DataColumn("ART", GetType(System.String)), New DataColumn("KundenNr", GetType(System.Int32)), New DataColumn("Status", GetType(System.String)), New DataColumn("Von", GetType(System.DateTime)), New DataColumn("Bis", GetType(System.DateTime)), New DataColumn("Absender", GetType(System.String)), New DataColumn("Empfänger", GetType(System.DateTime)), New DataColumn("LKW_Nr", GetType(System.String)), New DataColumn("KdAuftragsNr", GetType(System.String))})
Dim i As Integer = 1
For Each d In dt5.Rows
Dim tr As HtmlTableRow = New HtmlTableRow()
tr.Cells.Add(New HtmlTableCell(<td><CheckBox ID="CheckBox5" runat="server"/></td>))
tr.Cells.Add(New HtmlTableCell(i))
'tr.Cells.Add(New HtmlTableCell(d(Nothing)))
tr.Cells.Add(New HtmlTableCell(Kdnrtext))
tr.Cells.Add(New HtmlTableCell(d("Status")))
'tr.Cells.Add(New HtmlTableCell(Nothing))
'tr.Cells.Add(New HtmlTableCell(Nothing))
tr.Cells.Add(New HtmlTableCell(d("Absender")))
tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
'tr.Cells.Add(New HtmlTableCell(d("von")))
'tr.Cells.Add(New HtmlTableCell(d("bis")))
'tr.Cells.Add(New HtmlTableCell(d("Absender")))
'tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
tr.Cells.Add(New HtmlTableCell(d("LKW_Nr")))
tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
'tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
tr.Cells.Add(New HtmlTableCell(<td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15"/></button></center></td>))
dtmain.Rows.Add(tr)
Dim sb As StringBuilder = New StringBuilder()
'Table start.
sb.Append("<table cellpadding='5' cellspacing='0' style='border: 1px solid #ccc;font-size: 9pt;font-family:Arial'>")
'Adding HeaderRow.
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<th style='background-color: #B8DBFD;border: 1px solid #ccc'>" _
+ (column.ColumnName + "</th>")))
Next
sb.Append("</tr>")
'Adding DataRow.
For Each row As DataRow In dtmain.Rows
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<td style='width:100px;border: 1px solid #ccc'>" _
+ (row(column.ColumnName).ToString + "</td>")))
Next
sb.Append("</tr>")
Next
'Table end.
sb.Append("</table>")
ltTable.Text = sb.ToString
i = i + 1
Next
ElseIf rbt_Erf.Checked = False And rbt_Freig.Checked = False And rbt_Ankunft.Checked = False And rbt_Vorb.Checked = False And rbt_Vorg.Checked = False Then
dt6 = VERAG_PROG_ALLGEMEIN.cAviso.GET_KDLIST_WEB("", Kdnrtext,, datevon, datebis)
dtmain.Columns.AddRange(New DataColumn() {New DataColumn("Auswahl", GetType(CheckBox)), New DataColumn("Index-Nr", GetType(System.Int32)), New DataColumn("ART", GetType(System.String)), New DataColumn("KundenNr", GetType(System.Int32)), New DataColumn("Status", GetType(System.String)), New DataColumn("Von", GetType(System.DateTime)), New DataColumn("Bis", GetType(System.DateTime)), New DataColumn("Absender", GetType(System.String)), New DataColumn("Empfänger", GetType(System.DateTime)), New DataColumn("LKW_Nr", GetType(System.String)), New DataColumn("KdAuftragsNr", GetType(System.String))})
Dim i As Integer = 1
For Each d In dt6.Rows
Dim tr As HtmlTableRow = New HtmlTableRow()
tr.Cells.Add(New HtmlTableCell(i))
'tr.Cells.Add(New HtmlTableCell(d(Nothing)))
tr.Cells.Add(New HtmlTableCell(d("Status")))
'tr.Cells.Add(New HtmlTableCell(d("von")))
'tr.Cells.Add(New HtmlTableCell(d("bis")))
'tr.Cells.Add(New HtmlTableCell(d("Absender")))
'tr.Cells.Add(New HtmlTableCell(d("Empfänger")))
tr.Cells.Add(New HtmlTableCell(d("LKW_Nr")))
'tr.Cells.Add(New HtmlTableCell(d("KdAuftragsNr")))
tr.Cells.Add(New HtmlTableCell(<td><center><button type="button" class="btn btn-primary" data-toggle="collapse" data-target="#demo" id="togglecollapsesub1"><img src="../images/Icons/service/hilfe.png" width="15" height="15"/></button></center></td>))
dtmain.Rows.Add(tr)
Dim sb As StringBuilder = New StringBuilder()
'Table start.
sb.Append("<table cellpadding='5' cellspacing='0' style='border: 1px solid #ccc;font-size: 9pt;font-family:Arial'>")
'Adding HeaderRow.
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<th style='background-color: #B8DBFD;border: 1px solid #ccc'>" _
+ (column.ColumnName + "</th>")))
Next
sb.Append("</tr>")
'Adding DataRow.
For Each row As DataRow In dtmain.Rows
sb.Append("<tr>")
For Each column As DataColumn In dtmain.Columns
sb.Append(("<td style='width:100px;border: 1px solid #ccc'>" _
+ (row(column.ColumnName).ToString + "</td>")))
Next
sb.Append("</tr>")
Next
'Table end.
sb.Append("</table>")
ltTable.Text = sb.ToString
i = i + 1
Next
End If
@@ -147,4 +303,20 @@ Partial Class Kundenbereich_Default
txt_KdNr.Focus()
End Sub
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Dim dt As DataTable = New DataTable
dt.Columns.AddRange(New DataColumn() {New DataColumn("Id", GetType(System.Int32)), New DataColumn("Name", GetType(System.String)), New DataColumn("Country", GetType(System.String))})
dt.Rows.Add(1, "John Hammond", "United States")
dt.Rows.Add(2, "Mudassar Khan", "India")
dt.Rows.Add(3, "Suzanne Mathews", "France")
dt.Rows.Add(4, "Robert Schidner", "Russia")
Dim sb As StringBuilder = New StringBuilder()
End If
End Sub
End Class