Anis 4.30 2.5 . <% string[] color = new string[] {"#D0D5E1", "#EFF2F8"}; int count = 1; string connectionString = "Server=salvator; User ID=peaXX;Password=??;Database=peaXX;"; MySqlConnection con = new MySqlConnection(connectionString); con.Open(); MySqlCommand cmd = new MySqlCommand(); cmd.Connection = con; cmd.CommandText = "SELECT * from storage ORDER BY spice ASC"; MySqlDataAdapter da = new MySqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds, "storage"); int num = ds.Tables["storage"].Rows.Count; for (int i = 0; i < num; i++) { Response.Write("\n"); string s = (string)ds.Tables["storage"].Rows[i]["spice"]; Response.Write("" + s + "\n"); double d = (double)ds.Tables["storage"].Rows[i]["price"]; Response.Write("" + d + "£/kg\n"); d = (double)ds.Tables["storage"].Rows[i]["amount"]; Response.Write("" + d + "kg\n"); Response.Write("\n"); count = (count + 1) % 2; } con.Close(); %> PEA03/04 - IBR - TU-BS"> Anis 4.30 2.5 . <% string[] color = new string[] {"#D0D5E1", "#EFF2F8"}; int count = 1; string connectionString = "Server=salvator; User ID=peaXX;Password=??;Database=peaXX;"; MySqlConnection con = new MySqlConnection(connectionString); con.Open(); MySqlCommand cmd = new MySqlCommand(); cmd.Connection = con; cmd.CommandText = "SELECT * from storage ORDER BY spice ASC"; MySqlDataAdapter da = new MySqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds, "storage"); int num = ds.Tables["storage"].Rows.Count; for (int i = 0; i < num; i++) { Response.Write("\n"); string s = (string)ds.Tables["storage"].Rows[i]["spice"]; Response.Write("" + s + "\n"); double d = (double)ds.Tables["storage"].Rows[i]["price"]; Response.Write("" + d + "£/kg\n"); d = (double)ds.Tables["storage"].Rows[i]["amount"]; Response.Write("" + d + "kg\n"); Response.Write("\n"); count = (count + 1) % 2; } con.Close(); %> PEA03/04 - IBR - TU-BS">

Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Gruppe PEA16 Felix Gebhard Zied Medini Matthias Seidel

Ähnliche Präsentationen


Präsentation zum Thema: "Gruppe PEA16 Felix Gebhard Zied Medini Matthias Seidel"—  Präsentation transkript:

1 Gruppe PEA16 Felix Gebhard Zied Medini Matthias Seidel
Aufgabe 1: Statische und dynamische Web-Seiten Praktikum Enterprise Applications Wintersemester 2003/2004 Gruppe PEA16 Felix Gebhard Zied Medini Matthias Seidel

2 XML / Datenbank 21.11.2018 PEA03/04 - IBR - TU-BS
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="storage.xsl"?> <branch city="London" bid="00001" currency="£" xmlns:xsi=" xsi:noNamespaceSchemaLocation="storage.xsd"> <storage> <item pid="00001"> <spice>Anis</spice> <price>4.30</price> <amount>2.5</amount> </item> <item pid="00002"> . </storage> </branch> <% string[] color = new string[] {"#D0D5E1", "#EFF2F8"}; int count = 1; string connectionString = "Server=salvator; User ID=peaXX;Password=??;Database=peaXX;"; MySqlConnection con = new MySqlConnection(connectionString); con.Open(); MySqlCommand cmd = new MySqlCommand(); cmd.Connection = con; cmd.CommandText = "SELECT * from storage ORDER BY spice ASC"; MySqlDataAdapter da = new MySqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds, "storage"); int num = ds.Tables["storage"].Rows.Count; for (int i = 0; i < num; i++) { Response.Write("<tr bgcolor='" + color[count] + "'>\n"); string s = (string)ds.Tables["storage"].Rows[i]["spice"]; Response.Write("<td>" + s + "</td>\n"); double d = (double)ds.Tables["storage"].Rows[i]["price"]; Response.Write("<td align='center'>" + d + "£/kg</td>\n"); d = (double)ds.Tables["storage"].Rows[i]["amount"]; Response.Write("<td align='right'>" + d + "kg</td>\n"); Response.Write("</tr>\n"); count = (count + 1) % 2; } con.Close(); %> PEA03/04 - IBR - TU-BS

3 HTML-Seite Startseite die zur Homepage führt
Hier kann Kontakt hergestellt werden die Homepage PEA03/04 - IBR - TU-BS

4 HTML-Seite Kagashgdad# Hier werden einzelne Gewürze beschrieben:
Durch eine kurze Beschreibung, Herkunft des Gewürzes und Geschmack des Gewürzes Link auf die Praktikumsaufgaben PEA03/04 - IBR - TU-BS

5 …To be continued


Herunterladen ppt "Gruppe PEA16 Felix Gebhard Zied Medini Matthias Seidel"

Ähnliche Präsentationen


Google-Anzeigen