yavsc/yavscModel/WorkFlow/WFOrder.cs

46 lines
926 B
C#

12 years ago
using System;
using SalesCatalog.Model;
11 years ago
namespace Yavsc.Model.WorkFlow
12 years ago
{
public class WFOrder : IWFOrder
12 years ago
{
private Product p;
private DateTime date;
private string catref;
private string id = null;
12 years ago
public WFOrder(Product prod,string catalogReference){
date = DateTime.Now;
catref=catalogReference;
p = prod;
id = Guid.NewGuid ().ToString();
12 years ago
}
public override string ToString ()
{
return string.Format ("[Commande date={0} prodref={1}, cat={2}]",date,p.Reference,catref);
}
public event EventHandler<OrderStatusChangedEventArgs> StatusChanged;
12 years ago
#region IWFCommand implementation
/// <summary>
/// Gets the catalog reference, a unique id for the catalog (not a product id).
/// </summary>
/// <value>The catalog reference.</value>
public string UniqueID {
12 years ago
get {
return id;
12 years ago
}
}
public DateTime OrderDate {
get {
return date;
}
}
#endregion
}
}