* Makefile:
* CatalogManager.cs: Let the catalog manager ensure all command form are instancied * PhysicalProduct.cs: A better ToString method * SaleForm.cs: doc * NpgsqlContentProvider.cs: registers a command * FrontOfficeApiController.cs: Set the catalog referer uri in each command form found in the catalog * FrontOfficeController.cs: creates the catalog with referer uri * instdbws.sql: the command has got a client, as registered user * Commande.cs: The command has an id and a product reference * IContentProvider.cs: new RegisterCommand method * WorkFlowManager.cs: yavscModel/WorkFlow/IContentProvider.cs
This commit is contained in:
@ -41,14 +41,14 @@ namespace Yavsc.ApiControllers
|
||||
[AcceptVerbs("GET")]
|
||||
public Catalog Catalog ()
|
||||
{
|
||||
Catalog c = CatalogManager.GetCatalog ();
|
||||
Catalog c = CatalogManager.GetCatalog (Request.RequestUri.AbsolutePath);
|
||||
return c;
|
||||
}
|
||||
|
||||
[AcceptVerbs("GET")]
|
||||
public ProductCategory GetProductCategorie (string brandName, string prodCategorie)
|
||||
{
|
||||
return CatalogManager.GetCatalog ().GetBrand (brandName).GetProductCategory (prodCategorie)
|
||||
return CatalogManager.GetCatalog (Request.RequestUri.AbsolutePath).GetBrand (brandName).GetProductCategory (prodCategorie)
|
||||
;
|
||||
}
|
||||
/*
|
||||
|
@ -91,7 +91,7 @@ namespace Yavsc.Controllers
|
||||
public ActionResult Catalog ()
|
||||
{
|
||||
return View (
|
||||
CatalogManager.GetCatalog ()
|
||||
CatalogManager.GetCatalog (Request.Url.AbsolutePath)
|
||||
);
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ namespace Yavsc.Controllers
|
||||
[AcceptVerbs("GET")]
|
||||
public ActionResult Brand (string id)
|
||||
{
|
||||
Catalog c = CatalogManager.GetCatalog ();
|
||||
Catalog c = CatalogManager.GetCatalog (Request.Url.AbsolutePath);
|
||||
ViewData ["BrandName"] = id;
|
||||
return View ( c.GetBrand (id) );
|
||||
}
|
||||
@ -117,7 +117,7 @@ namespace Yavsc.Controllers
|
||||
{
|
||||
ViewData ["BrandName"] = id;
|
||||
return View (
|
||||
CatalogManager.GetCatalog ().GetBrand (id).GetProductCategory (pc)
|
||||
CatalogManager.GetCatalog (Request.Url.AbsolutePath).GetBrand (id).GetProductCategory (pc)
|
||||
);
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ namespace Yavsc.Controllers
|
||||
ViewData ["BrandName"] = id;
|
||||
ViewData ["ProdCatRef"] = pc;
|
||||
ViewData ["ProdRef"] = pref;
|
||||
Catalog cat = CatalogManager.GetCatalog ();
|
||||
Catalog cat = CatalogManager.GetCatalog (Request.Url.AbsolutePath);
|
||||
if (cat == null) {
|
||||
ViewData ["Message"] = "Catalog introuvable";
|
||||
ViewData ["RefType"] = "Catalog";
|
||||
@ -189,7 +189,7 @@ namespace Yavsc.Controllers
|
||||
Session["Basket"]=new List<Commande>();
|
||||
List<Commande> basket = Session["Basket"] as List<Commande>;
|
||||
// Add specified product command to the basket,
|
||||
basket.Add(new Commande(0,0,collection));
|
||||
basket.Add(Commande.Create(collection));
|
||||
return View (collection);
|
||||
} catch (Exception e)
|
||||
{
|
||||
|
Reference in New Issue
Block a user