* Basket.aspx: refactoring

* NpgsqlContentProvider.cs: fixing the command parameters
  deserialisation

* NpgsqlWorkflow.csproj: prehaps not needed new references

* FrontOfficeController.cs: code formatting

* Command.aspx: a link to the basket

* Commande.cs: In order the deserialize from Json
This commit is contained in:
Paul Schneider
2015-02-18 16:32:22 +01:00
parent 75fe032822
commit 6dfe83308e
6 changed files with 37 additions and 13 deletions

View File

@ -186,10 +186,9 @@ namespace Yavsc.Controllers
[Authorize]
public ActionResult Basket ()
{
return View (wfmgr.GetCommands(Membership.GetUser().UserName));
return View (wfmgr.GetCommands (Membership.GetUser ().UserName));
}
/// <summary>
/// Command the specified collection.
/// </summary>

View File

@ -1,14 +1,15 @@
<%@ Page Title="Basket" Language="C#" Inherits="System.Web.Mvc.ViewPage<Basket>" MasterPageFile="~/Models/App.master" %>
<%@ Page Title="Basket" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<CommandSet>" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = Title +" "+ Model.Count+" article(s)"; %>
</asp:Content>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:Content ContentPlaceHolderID="MainContent" ID="mainContent" runat="server">
<% if (Model.Count>0) { %>
<ul>
<% foreach (Commande cmd in Model.Values) { %>
<% foreach (Command cmd in Model.Values) { %>
<li>
<%= cmd.Id %>
<%= cmd.CreationDate %>
@ -16,11 +17,22 @@
<%= cmd.Status %>
<%= cmd.ProductRef %>
<ul>
<% foreach (string key in cmd.Parameters.Keys) { %>
<% if (cmd.Parameters!=null)
foreach (string key in cmd.Parameters.Keys) { %>
<li><%=key%>: <%=cmd.Parameters[key]%></li>
<% } %>
</ul>
</li>
<% } %>
</ul>
<% } %>
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
<ul><li>
<%= Html.ActionLink("Catalog","Catalog" ) %>
</li><li>
<%= Html.ActionLink("Estimates","Estimates" ) %>
</li></ul>
</asp:Content>

View File

@ -1,6 +1,7 @@
<%@ Page Title="Commande" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<FormCollection>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<%= Html.ActionLink("Votre panier","Basket","FrontOffice" ) %>
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">