Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Order/SaveOrder.cshtml @ 11297

Last change on this file since 11297 was 9654, checked in by spimming, 12 years ago

#1888:

  • Added model and view for contact information
  • Insert contact information on SaveOrder page
  • Set correct entity state
File size: 3.5 KB
Line 
1@model HeuristicLab.Services.Optimization.Web.Models.OrderModel
2@using HeuristicLab.Services.Optimization.Web.Helpers
3<h2>Save your Order</h2>
4<p>Following items will be purchased</p>
5<table>
6<thead>
7<tr>
8<th>Product name:</th><th>Price per Unit:</th><th>Quantity:</th><th>Total Price:</th>
9</tr>
10</thead>
11<tbody>
12@foreach (var product in Model.ProductQuantities.Keys) {
13    <tr>
14        <td>@Model.Products[product].Name</td>
15        <td>@Model.Products[product].Price Euro</td>
16        <td>@Model.ProductQuantities[product]</td>
17        <td>@Model.ProductSum(product) Euro</td>
18    </tr>
19}
20</tbody>
21</table>
22<p>Resulting in total costs of @Model.TotalSum() Euro.</p>
23
24
25
26@if (Model.User.PaymentInformation == null || Model.User.PaymentInformation.Count == 0) {
27  <h2>You didn't specify any payment information yet. Please click @Html.ActionLink("here", "Payment")
28    to enter the information.</h2>
29} else {
30  <h2>Choose one of your payment options:</h2>
31  foreach (var pi in Model.User.PaymentInformation) {
32  <p>
33    @Html.Label("PaymentInformationId", string.Format("{0} ({1})", pi.PaymentMethod, pi.CardNumber))
34    @Html.RadioButton("PaymentInformationId", pi.PaymentInformationId)
35  </p>
36  }
37  <h3>Or add payment information by clicking @Html.ActionLink("here", "Payment").</h3>
38}
39
40@if (Model.User.ContactInformation == null) {
41  <h2>You didn't specify any contact information yet. Please click @Html.ActionLink("here", "ContactInformation")
42  to enter the information.</h2>
43} else {
44  <h2>Contact Information</h2>
45 
46  <table>
47    <tbody>
48      <tr>
49        <td>@Html.LabelFor(m => m.User.ContactInformation.FirstName)</td>
50        <td>@Model.User.ContactInformation.FirstName</td>
51      </tr>
52      <tr>
53        <td>@Html.LabelFor(m => m.User.ContactInformation.LastName)</td>
54        <td>@Model.User.ContactInformation.LastName</td>
55      </tr>
56      <tr>
57        <td>@Html.LabelFor(m => m.User.ContactInformation.FirstName)</td>
58        <td>@Model.User.ContactInformation.FirstName</td>
59      </tr>
60      <tr>
61        <td>@Html.LabelFor(m => m.User.ContactInformation.Email)</td>
62        <td>@Model.User.ContactInformation.Email</td>
63      </tr>
64      <tr>
65        <td>@Html.LabelFor(m => m.User.ContactInformation.OrganizationName)</td>
66        <td>@Model.User.ContactInformation.OrganizationName</td>
67      </tr>
68      <tr>
69        <td>@Html.LabelFor(m => m.User.ContactInformation.Street)</td>
70        <td>@Model.User.ContactInformation.Street</td>
71      </tr>
72      <tr>
73        <td>@Html.LabelFor(m => m.User.ContactInformation.PostalCode)</td>
74        <td>@Model.User.ContactInformation.PostalCode</td>
75      </tr>
76      <tr>
77        <td>@Html.LabelFor(m => m.User.ContactInformation.City)</td>
78        <td>@Model.User.ContactInformation.City</td>
79      </tr>
80      <tr>
81        <td>@Html.LabelFor(m => m.User.ContactInformation.State)</td>
82        <td>@Model.User.ContactInformation.State</td>
83      </tr>
84    </tbody>
85  </table>
86 
87  <h3>Edit contact information by clicking @Html.ActionLink("here", "ContactInformation")</h3>
88}
89
90@if ((Model.User.PaymentInformation != null && Model.User.PaymentInformation.Count != 0) && (Model.User.ContactInformation != null)) {
91  using (Html.BeginForm("SaveOrder", "Order")) {
92  <h2>How often would you like to be billed?</h2>
93  <p>@Html.RadioButtonForEnum(m => m.BillingPeriod)</p>
94 
95  <h2>Would you like to pay upfront or at the end of the period?</h2>
96  <p>@Html.RadioButtonForEnum(m => m.BillingType)</p>
97 
98  <p><input type="submit" value="Save order" /></p>
99  }
100}
Note: See TracBrowser for help on using the repository browser.