Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/13 16:30:39 (12 years ago)
Author:
fschoepp
Message:

#1888:

  • Added an overview for users to inspect their orders
  • Order Administrators may now suspend or reactivate orders
  • When creating an order, its necessary to enter payment information (paypal, credit card,...) before
  • Also, the billing period and type must be entered during the creation of an order.
Location:
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Account/LogOn.cshtml

    r9215 r9582  
    77<h2>Log On</h2>
    88<p>
    9     Please enter your user name and password. <!--@Html.ActionLink("Register", "Register") if you don't have an account.-->
     9    Please enter your user name and password. @Html.ActionLink("Register", "Register") if you don't have an account.
    1010</p>
    1111
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Order/AddProduct.cshtml

    r9556 r9582  
    1515       <td>@Html.TextBoxFor(m => m.Quantity)</td>
    1616       <td>
    17         <input type="hidden" value="@product.Id.ToString()" name="ProductId" />
     17        <input type="hidden" value="@product.ProductId.ToString()" name="ProductId" />
    1818        <input type="submit" value="Add product" />
    1919       </td>     
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Order/SaveOrder.cshtml

    r9556 r9582  
    11@model HeuristicLab.Services.Optimization.Web.Models.OrderModel
    2 
     2@using HeuristicLab.Services.Optimization.Web.Helpers
    33<h2>Save your Order</h2>
    44<p>Following items will be purchased</p>
     
    2222<p>Resulting in total costs of @Model.TotalSum() Euro.</p>
    2323
    24  @using(Html.BeginForm("SaveOrder", "Order")) {
    25  <div>
    26  <p>
    27     <input type="submit" value="Save order" />
    28 </p>
    29 </div>
    30  }
     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") to enter the information.</h2>
     28}
     29else {
     30    foreach (var pi in Model.User.PaymentInformation) {
     31         @Html.Label("PaymentInformationId", string.Format("{0} ({1})", pi.PaymentMethod, pi.CardNumber))
     32         @Html.RadioButton("PaymentInformationId", pi.PaymentInformationId);
     33    }
     34    <h2>Or add payment information by clicking @Html.ActionLink("here", "Payment").</h2>
     35   
     36    using (Html.BeginForm("SaveOrder", "Order")) {
     37    <h2>How often would you like to be billed?</h2>
     38
     39    @Html.RadioButtonForEnum(m => m.BillingPeriod)
     40
     41    <h2>Would you like to pay upfront or at the end of the period?</h2>
     42
     43    @Html.RadioButtonForEnum(m => m.BillingType)
     44     
     45     <div>
     46     <p>
     47        <input type="submit" value="Save order" />
     48    </p>
     49    </div>
     50}
     51}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/OrderAdmin/Index.cshtml

    r9556 r9582  
    77<h2>Welcome to the order administartion!</h2>
    88
    9 @if (Model.Orders == null || Model.Orders.Count > 0) {
     9<h3>Newly created orders:</h3>
     10@if (Model.CreatedOrders != null && Model.CreatedOrders.Count > 0) {
    1011
    1112<table>
     
    1617</thead>
    1718<tbody>
    18 @foreach (var order in Model.Orders) {
     19@foreach (var order in Model.CreatedOrders) {
    1920    <tr>
    2021    <td>@order.User.Name</td>
     
    3435    @foreach (var orderLine in order.OrderLines) {
    3536        <tr>
    36         <td>@orderLine.Id</td>
     37        <td>@orderLine.OrderId</td>
    3738        <td>@orderLine.Product.Name</td>
    3839        <td>@orderLine.ProductPrice</td>
     
    4546    <td>
    4647    @using (Html.BeginForm("ActivateOrder", "OrderAdmin")) {
     48        <input type="hidden" name="OrderId" value="@order.OrderId" />
    4749        <input type="submit" value="Activate" />
    4850    }
     
    5456}
    5557else {
    56     <p>No new orders available!</p>
     58    <p>No new orders available.</p>
    5759}
     60
     61<h3>Active orders:</h3>
     62@if (Model.ActiveOrders != null && Model.ActiveOrders.Count > 0) {
     63
     64<table>
     65<thead>
     66<tr>
     67<th>Username:</th><th>Order details:</th><th>Suspend order?</th>
     68</tr>
     69</thead>
     70<tbody>
     71@foreach (var order in Model.ActiveOrders) {
     72    <tr>
     73    <td>@order.User.Name</td>
     74    <td>
     75   
     76   
     77    <table>
     78    <thead>
     79    <tr>
     80    <th>Id:</th>
     81    <th>Product name:</th>
     82    <th>Product price:</th>
     83    <th>Product quantity:</th>
     84    </tr>
     85    </thead>
     86    <tbody>
     87    @foreach (var orderLine in order.OrderLines) {
     88        <tr>
     89        <td>@orderLine.OrderId</td>
     90        <td>@orderLine.Product.Name</td>
     91        <td>@orderLine.ProductPrice</td>
     92        <td>@orderLine.Quantity</td>
     93        </tr>
     94    }
     95    </tbody>
     96    </table>
     97    </td>
     98    <td>
     99    @using (Html.BeginForm("SuspendOrder", "OrderAdmin")) {
     100        <input type="hidden" name="OrderId" value="@order.OrderId" />
     101        <input type="submit" value="Suspend" />
     102    }
     103    </td>
     104    </tr>
     105}
     106</tbody>
     107</table>
     108}
     109else {
     110    <p>No activated orders available.</p>
     111}
     112
     113<h3>Suspended orders:</h3>
     114@if (Model.SuspendedOrders != null && Model.SuspendedOrders.Count > 0) {
     115
     116<table>
     117<thead>
     118<tr>
     119<th>Username:</th><th>Order details:</th><th>Activate order?</th>
     120</tr>
     121</thead>
     122<tbody>
     123@foreach (var order in Model.SuspendedOrders) {
     124    <tr>
     125    <td>@order.User.Name</td>
     126    <td>
     127   
     128   
     129    <table>
     130    <thead>
     131    <tr>
     132    <th>Id:</th>
     133    <th>Product name:</th>
     134    <th>Product price:</th>
     135    <th>Product quantity:</th>
     136    </tr>
     137    </thead>
     138    <tbody>
     139    @foreach (var orderLine in order.OrderLines) {
     140        <tr>
     141        <td>@orderLine.OrderId</td>
     142        <td>@orderLine.Product.Name</td>
     143        <td>@orderLine.ProductPrice</td>
     144        <td>@orderLine.Quantity</td>
     145        </tr>
     146    }
     147    </tbody>
     148    </table>
     149    </td>
     150    <td>
     151    @using (Html.BeginForm("ReactivateOrder", "OrderAdmin")) {
     152        <input type="hidden" name="OrderId" value="@order.OrderId" />
     153        <input type="submit" value="Reactivate" />
     154    }
     155    </td>
     156    </tr>
     157}
     158</tbody>
     159</table>
     160}
     161else {
     162    <p>No suspended orders available.</p>
     163}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml

    r9508 r9582  
    6363            <ul id="menu">
    6464                <li>@Html.ActionLink("Home", "Index", "Home")</li>
    65                 <li>@Html.ActionLink("Experiment", "Index", "Experiment")</li>               
     65                <li>@Html.ActionLink("Experiment", "Index", "Experiment")</li>         
     66                <li>@Html.ActionLink("Orders", "Overview", "Order")</li>     
    6667                <li>@Html.ActionLink("Admin", "Index", "Admin")</li>               
     68                <li>@Html.ActionLink("Order Administration", "Index", "OrderAdmin")</li>               
    6769                <li>@Html.ActionLink("About", "About", "Home")</li>
    6870            </ul>
Note: See TracChangeset for help on using the changeset viewer.