コード例 #1
0
 // GET: Menu
 public ActionResult LoadMenu()
 {
     if (Session["SS_Menu_Product"] == null)
     {
         Session["SS_Menu_Product"]      = productBLL.GetAll();
         Session["SS_Menu_Submenu"]      = productCategoryBLL.GetByParentID(2);
         Session["SS_Menu_PostCategory"] = postCategoryBLL.GetAll();
         Session["SS_Menu_Post"]         = postBLL.GetAll();
     }
     ViewBag.Products     = (List <Product>)Session["SS_Menu_Product"];
     ViewBag.Submenu      = (List <ProductCategory>)Session["SS_Menu_Submenu"];
     ViewBag.PostCategory = (List <PostCategory>)Session["SS_Menu_PostCategory"];
     ViewBag.Post         = (List <Post>)Session["SS_Menu_Post"];
     return(PartialView(menuBLL.GetAll()));
 }