yavsc/yavscModel/WorkFlow/WFOrder.cs

65 lines
1.1 KiB
C#

10 years ago
using System;
using SalesCatalog.Model;
10 years ago
namespace Yavsc.Model.WorkFlow
10 years ago
{
public class WFOrder : IWFOrder
10 years ago
{
public string GetStatus ()
10 years ago
{
// TODO Manager.GetStatus(this.id);
throw new NotImplementedException ();
10 years ago
}
private long prodid;
10 years ago
public long ProductId {
get {
return prodid;
}
}
private long id = 0;
public long UniqueID {
10 years ago
get {
return id;
10 years ago
}
}
private DateTime date;
10 years ago
public DateTime OrderDate {
get {
return date;
}
}
private string catref;
/// <summary>
/// Gets the catalog reference, a unique id for the catalog (not a product id).
/// </summary>
/// <value>The catalog reference.</value>
public string CatalogReference {
get {
return catref;
}
}
public static WFOrder CreateOrder(long productId,string catalogReference){
return new WFOrder() {date = DateTime.Now,
catref=catalogReference,
prodid = productId};
//TODO id = Manager.Order(...)
}
public override string ToString ()
{
return string.Format ("[Commande date={0} prodref={1}, cat={2}]",date,prodid,catref);
}
10 years ago
}
}