コード例 #1
0
        public ActionResult SubCategoryAdd()
        {
            var sourcelist   = NewsUIService.GetNewsSourceList().ToList();
            var categorylist = NewsUIService.GetNewsCategoryList().ToList();

            ViewData["Sourcelist"]   = sourcelist.GetSelectList();
            ViewData["Categorylist"] = categorylist.GetSelectList();
            return(View());
        }
コード例 #2
0
        public ActionResult SubCategoryEdit(int subcategoryId)
        {
            var subcategory = dbContextService.Single <NewsSubCategory>(subcategoryId);

            var sourcelist   = NewsUIService.GetNewsSourceList().ToList();
            var categorylist = NewsUIService.GetNewsCategoryList().ToList();

            ViewData["Sourcelist"]   = sourcelist.GetSelectList(subcategory.SourceId);
            ViewData["Categorylist"] = categorylist.GetSelectList(subcategory.CategoryId);

            ViewData["IsUpdate"] = true;
            return(View("SubCategoryAdd", subcategory));
        }
コード例 #3
0
        public ActionResult InfAddressEdit(int infAddressId)
        {
            var extraApp = dbContextService.Single <NewsInfAddress>(infAddressId);

            var sourcelist      = NewsUIService.GetNewsSourceList().ToList();
            var categorylist    = NewsUIService.GetNewsCategoryList().ToList();
            var subcategorylist = NewsUIService.GetNewsSubCategoryList().ToList();

            ViewData["Sourcelist"]      = sourcelist.GetSelectList();
            ViewData["Categorylist"]    = categorylist.GetSelectList();
            ViewData["SubCategorylist"] = subcategorylist.GetSelectList();

            ViewData["IsUpdate"] = true;
            return(View("InfAddressAdd", extraApp));
        }