2014-10-06 04:58:47 +02:00
|
|
|
using System;
|
|
|
|
|
using Yavsc;
|
|
|
|
|
using SalesCatalog;
|
|
|
|
|
using SalesCatalog.Model;
|
|
|
|
|
using System.Collections.Specialized;
|
2015-01-27 14:17:33 +01:00
|
|
|
using Yavsc.Model.WorkFlow;
|
2014-10-06 04:58:47 +02:00
|
|
|
|
2014-10-10 11:54:18 +02:00
|
|
|
|
2015-01-27 14:17:33 +01:00
|
|
|
namespace Yavsc.Model.FrontOffice
|
2014-10-06 04:58:47 +02:00
|
|
|
{
|
|
|
|
|
public class Commande
|
|
|
|
|
{
|
2014-10-10 11:54:18 +02:00
|
|
|
public DateTime CreationDate { get; set; }
|
2015-01-26 16:44:41 +01:00
|
|
|
public long Id { get; set; }
|
|
|
|
|
public string ProdRef { get; set; }
|
|
|
|
|
public Commande() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static Commande Create(NameValueCollection collection)
|
2014-10-06 04:58:47 +02:00
|
|
|
{
|
2015-01-26 16:44:41 +01:00
|
|
|
Commande cmd = new Commande ();
|
|
|
|
|
// string catref=collection["catref"]; // Catalog Url from which formdata has been built
|
2015-01-27 14:17:33 +01:00
|
|
|
cmd.ProdRef=collection["ref"]; // Required product reference
|
2015-01-26 16:44:41 +01:00
|
|
|
cmd.CreationDate = DateTime.Now;
|
|
|
|
|
WorkFlowManager wm = new WorkFlowManager ();
|
|
|
|
|
wm.RegisterCommand (cmd); // sets cmd.Id
|
|
|
|
|
return cmd;
|
2014-10-06 04:58:47 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|