This commit is contained in:
Paul Schneider
2015-01-27 14:17:33 +01:00
parent 7558e11bd6
commit 93c18633b9
28 changed files with 338 additions and 150 deletions

View File

@ -0,0 +1,35 @@
//
// Basket.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2015 Paul Schneider
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using Yavsc.Model.WorkFlow;
namespace Yavsc.Model.FrontOffice
{
public class Basket: List<Commande>
{
public Basket ()
{
}
}
}

View File

@ -3,9 +3,10 @@ using Yavsc;
using SalesCatalog;
using SalesCatalog.Model;
using System.Collections.Specialized;
using Yavsc.Model.WorkFlow;
namespace Yavsc.Model.WorkFlow
namespace Yavsc.Model.FrontOffice
{
public class Commande
{
@ -19,7 +20,7 @@ namespace Yavsc.Model.WorkFlow
{
Commande cmd = new Commande ();
// string catref=collection["catref"]; // Catalog Url from which formdata has been built
cmd.ProdRef=collection["prodref"]; // Required product reference
cmd.ProdRef=collection["ref"]; // Required product reference
cmd.CreationDate = DateTime.Now;
WorkFlowManager wm = new WorkFlowManager ();
wm.RegisterCommand (cmd); // sets cmd.Id

View File

@ -52,6 +52,12 @@ namespace Yavsc.Model {
}
}
public static string Item_added_to_basket {
get {
return ResourceManager.GetString("Item_added_to_basket", resourceCulture);
}
}
public static string Unitary_cost {
get {
return ResourceManager.GetString("Unitary_cost", resourceCulture);

View File

@ -45,5 +45,5 @@
<data name="was_added_to_the_empty_role"><value>Il n'y avait pas 'utilisateur dans le rôle '{1}'. Vous ({0}) avez été ajouté au rôle '{1}'.</value></data>
<data name="younotadmin"><value>Vous n'êtes pas administrateur</value></data>
<data name="role_created"><value>Rôle créé</value></data>
<data name="Item_added_to_basket"><value>Article ajouté au panier</value></data>
</root>

View File

@ -45,4 +45,5 @@
<data name="was_added_to_the_empty_role"><value>There was no user in the '{1}' role. You ({0}) was just added as firt user in the '{1}' role.</value></data>
<data name="younotadmin"><value>You're not administrator</value></data>
<data name="role_created"><value>role created</value></data>
<data name="Item_added_to_basket"><value>Item added to basket</value></data>
</root>

View File

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Yavsc.Model.WorkFlow
{
public class BasketImpact
{
public string ProductRef { get; set; }
public int Count { get; set; }
public string Message { get; set; }
}
}

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using Yavsc.Model.FrontOffice;
namespace Yavsc.Model.WorkFlow
{

View File

@ -1,25 +0,0 @@
using System;
using Yavsc.Model.WorkFlow;
using System.Web.Mvc;
namespace Yavsc.Model.WorkFlow
{
public interface IWFModule
{
/// <summary>
/// Gets the state for an order (assuming it was passed to <c>Handle</c>).
/// </summary>
/// <returns>The state.</returns>
/// <param name="c">C.</param>
int GetState (IWFOrder c);
/// <summary>
/// Handle the specified order and form input value collection.
/// </summary>
/// <param name="order">l'ordre</param>
/// <param name="collection">La collection de valeur de champs d'entée de formulaires.</param>
/// <returns>0 when the module accepts to handle the order, non null value otherwize<returns>
int Handle (IWFOrder order,FormCollection collection);
}
}

View File

@ -1,22 +0,0 @@
using System;
using System.Collections.Generic;
namespace Yavsc.Model.WorkFlow
{
public interface IWFOrder
{
/// <summary>
/// Gets the unique Identifier for this order, in this application.
/// </summary>
/// <value>The unique I.</value>
long UniqueID {
get;
}
/// <summary>
/// Gets the actual status for this order.
/// </summary>
/// <returns>The status.</returns>
string GetStatus();
}
}

View File

@ -4,6 +4,7 @@ using System.Configuration;
using Yavsc.Model.WorkFlow.Configuration;
using System.Collections.Specialized;
using SalesCatalog.Model;
using Yavsc.Model.FrontOffice;
namespace Yavsc.Model.WorkFlow
{

View File

@ -58,10 +58,7 @@
<Compile Include="FileSystem\FileInfoCollection.cs" />
<Compile Include="WorkFlow\Writting.cs" />
<Compile Include="WorkFlow\Estimate.cs" />
<Compile Include="WorkFlow\WFOrder.cs" />
<Compile Include="WorkFlow\IContentProvider.cs" />
<Compile Include="WorkFlow\IWFModule.cs" />
<Compile Include="WorkFlow\IWFOrder.cs" />
<Compile Include="WorkFlow\OrderStatusChangedEventArgs.cs" />
<Compile Include="Blogs\BlogEntry.cs" />
<Compile Include="Blogs\Blog.cs" />
@ -70,8 +67,6 @@
<Compile Include="Blogs\FindBlogEntryFlags.cs" />
<Compile Include="WorkFlow\StatusChange.cs" />
<Compile Include="IModule.cs" />
<Compile Include="WorkFlow\BasketImpact.cs" />
<Compile Include="WorkFlow\Commande.cs" />
<Compile Include="Blogs\BlogManager.cs" />
<Compile Include="Blogs\BlogProvider.cs" />
<Compile Include="WorkFlow\WorkFlowManager.cs" />
@ -102,6 +97,8 @@
<Compile Include="ViewRenderer.cs" />
<Compile Include="Google\GoogleErrorMessage.cs" />
<Compile Include="RssFeeds.cs" />
<Compile Include="FrontOffice\Commande.cs" />
<Compile Include="FrontOffice\Basket.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
@ -111,6 +108,7 @@
<Folder Include="Admin\" />
<Folder Include="FileSystem\" />
<Folder Include="Google\" />
<Folder Include="FrontOffice\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SalesCatalog\SalesCatalog.csproj">