Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.94 KB | None | 0 0
  1. @model AutoKaufMVC.Models.SQLQuery
  2. @{
  3.     Layout = null;
  4. }
  5.  
  6. <!DOCTYPE html>
  7.  
  8. <html>
  9. <head>
  10.     <meta name="viewport" content="width=device-width" />
  11.     <title>Index</title>
  12. </head>
  13. <body>
  14.     @if (Model.AutoModell != null)
  15.     {
  16.  
  17.         <h1>@Model.AutoModell</h1>
  18.         <p>@Model.AutoPreis &euro;</p>
  19.         <p>
  20.             Ausgewählte Extras: <br />
  21.             @foreach (string s in @Model.zusaetze)
  22.             {
  23.                 <label>+ @s = @Model.Extras[s] &euro; </label> <br />
  24.             }
  25.         <p><label>Gesamtpreis: @Model.Gesamtpreis &euro; </label></p>
  26.         </p>
  27.         <a href="~/">HOME</a>
  28.     }
  29.     else if (Model.AutoHersteller == null || Model.AutoHersteller == "0")
  30.     {
  31.  
  32.         <form action="/Home/Index" method="post">
  33.             <select size="1" name="AutoHersteller">
  34.  
  35.                 <option value="0" selected="selected">Bitte Autohersteller auswählen</option>
  36.                 @for (int i = 0; i < @Model.HerstellerListe.Count; i++)
  37.                {
  38.                <option value=@i+1>@Model.HerstellerListe[@i]</option>
  39.                 }
  40.             </select>
  41.             <input type="submit" />
  42.         </form>
  43.     }
  44.     else if (Model.AutoModell == null)
  45.     {
  46.         <h1>Modelle von @Model.HerstellerName :</h1>
  47.         <form action="/Home/Index" method="post">
  48.             @foreach (string s in @Model.CarList)
  49.             {
  50.                 <input type="radio" name="AutoModell" value=@s>
  51.                 <label>@s</label><br />
  52.             }
  53.             <p>
  54.                 Verfügbage Extras: <br />
  55.                 @foreach (KeyValuePair<string, decimal> x in @Model.Extras)
  56.                 {
  57.                     <input type="checkbox" name="zusaetze" value=@x.Key /> <label>@x.Key = @x.Value &euro;</label> <br />
  58.                 }
  59.             </p>
  60.             <input type="submit" /><br />
  61.  
  62.             <a href="~/">HOME</a>
  63.         </form>
  64.     }
  65. </body>
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement