Пример #1
0
 public void home(JabinfoContext context, string parentId)
 {
     string parent_title = "顶级分类";
     string last_id = parentId;
     string currnt_title = "";
     string top_id = string.Empty;
     if (parentId.Length > 2)
     {
         CategoryVO categoryVO = CategoryMapper.I.Create (parentId);
         if (categoryVO.categoryId != null)
         {
             currnt_title = categoryVO.title;
             last_id = categoryVO.parentId;
             CategoryVO lastVO = CategoryMapper.I.Create(last_id);
             parent_title = lastVO.title;
         }
         top_id = topid(categoryVO);
     }
     else
     {
         top_id =parentId;
     }
     context.SetView (string.Format("home{0}",top_id));
     context.Variable ["categoryList"] = CategoryMapper.I.Select1 (parentId);
     context.Variable["parentId"] = parentId;
     context.Variable["lastId"] = last_id;
     context.Variable["currnt_title"] = currnt_title;
     context.Variable["parent_title"] = parent_title;
 }