コード例 #1
0
        // GET: Admin/StaticCategory
        public ActionResult Index(int?id)
        {
            int categoryId = (id.HasValue) ? Convert.ToInt32(id) : 0;

            ViewBag.StaticCategory = StaticCategory.DropDown(categoryId);
            return(View());
        }
コード例 #2
0
        // GET: Admin/StaticCategoryListItem
        public ActionResult Index(int?id)
        {
            int categoryListId = (id.HasValue) ? Convert.ToInt32(id) : 0;
            int categoryId     = (categoryListId > 0) ? db.StaticCategoryLists.Find(categoryListId).StaticCategory.Id : 0;

            ViewBag.StaticCategory     = StaticCategory.DropDown(categoryId);
            ViewBag.StaticCategoryList = StaticCategoryList.DropDown(categoryId, categoryListId);

            return(View());
        }