* 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:
Paul Schneider
2015-01-26 16:44:41 +01:00
parent 85346d0e00
commit b835053e5f
11 changed files with 123 additions and 20 deletions

View File

@ -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)
;
}
/*

View File

@ -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)
{