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

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,30 +0,0 @@
using System;
using Yavsc;
using SalesCatalog;
using SalesCatalog.Model;
using System.Collections.Specialized;
namespace Yavsc.Model.WorkFlow
{
public class Commande
{
public DateTime CreationDate { get; set; }
public long Id { get; set; }
public string ProdRef { get; set; }
public Commande() {
}
public static Commande Create(NameValueCollection collection)
{
Commande cmd = new Commande ();
// string catref=collection["catref"]; // Catalog Url from which formdata has been built
cmd.ProdRef=collection["prodref"]; // Required product reference
cmd.CreationDate = DateTime.Now;
WorkFlowManager wm = new WorkFlowManager ();
wm.RegisterCommand (cmd); // sets cmd.Id
return cmd;
}
}
}

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
{