* minor changes (like an [em] BBcode)
* Trying to use OAuth2 Google Login
This commit is contained in:
parent
d1f76f4902
commit
3f41636719
32 changed files with 16285 additions and 119 deletions
|
|
@ -9,10 +9,14 @@ namespace Yavsc.Model.WorkFlow
|
|||
/// Gets the unique Identifier for this order, in this application.
|
||||
/// </summary>
|
||||
/// <value>The unique I.</value>
|
||||
string UniqueID {
|
||||
long UniqueID {
|
||||
get;
|
||||
}
|
||||
event EventHandler<OrderStatusChangedEventArgs> StatusChanged;
|
||||
/// <summary>
|
||||
/// Gets the actual status for this order.
|
||||
/// </summary>
|
||||
/// <returns>The status.</returns>
|
||||
string GetStatus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,41 +5,60 @@ namespace Yavsc.Model.WorkFlow
|
|||
{
|
||||
public class WFOrder : IWFOrder
|
||||
{
|
||||
private Product p;
|
||||
private DateTime date;
|
||||
private string catref;
|
||||
private string id = null;
|
||||
public WFOrder(Product prod,string catalogReference){
|
||||
date = DateTime.Now;
|
||||
catref=catalogReference;
|
||||
p = prod;
|
||||
id = Guid.NewGuid ().ToString();
|
||||
}
|
||||
public override string ToString ()
|
||||
public string GetStatus ()
|
||||
{
|
||||
return string.Format ("[Commande date={0} prodref={1}, cat={2}]",date,p.Reference,catref);
|
||||
// TODO Manager.GetStatus(this.id);
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public event EventHandler<OrderStatusChangedEventArgs> StatusChanged;
|
||||
private long prodid;
|
||||
|
||||
#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 {
|
||||
public long ProductId {
|
||||
get {
|
||||
return prodid;
|
||||
}
|
||||
}
|
||||
|
||||
private long id = 0;
|
||||
public long UniqueID {
|
||||
get {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
private DateTime date;
|
||||
public DateTime OrderDate {
|
||||
get {
|
||||
return date;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue