* Circle.cs:
* CircleInfo.cs: * CircleInfoCollection.cs: cleans imports * CircleManager.cs: implements a circle manager * CircleProvider.cs: Defines a default Circle provider * EventPub.cs: * CalendarController.cs: refactoring * CircleController.cs: implements with default circle provider * FrontOfficeController.cs: throws descriptive exception message at searching for a catalog * Catalog.aspx: Fixes links on product categories * ProductCategory.aspx: Fixes links on products * YavscModel.csproj: Includes Circle provider definitions
This commit is contained in:
parent
6fa1e6de27
commit
8c64f3c374
14 changed files with 351 additions and 16 deletions
|
|
@ -153,9 +153,17 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
ViewData ["BrandId"] = brandid;
|
||||
ViewData ["ProductCategoryId"] = pcid;
|
||||
return View (
|
||||
CatalogManager.GetCatalog ().GetBrand (brandid).GetProductCategory (pcid)
|
||||
);
|
||||
|
||||
var cat = CatalogManager.GetCatalog ();
|
||||
if (cat == null)
|
||||
throw new Exception ("No catalog");
|
||||
var brand = cat.GetBrand (brandid);
|
||||
if (brand == null)
|
||||
throw new Exception ("Not a brand id: "+brandid);
|
||||
var pcat = brand.GetProductCategory (pcid);
|
||||
if (pcat == null)
|
||||
throw new Exception ("Not a product category id in this brand: " + pcid);
|
||||
return View (pcat);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue