public ActionResult Index() { CatalogIndexView vm = new CatalogIndexView(); vm.Catalogs = _catalogService.FindAll(); return(View(vm)); }
public ActionResult EditCatalogPost(RoleEditCatalogView vm) { int cnt = 0; if (ModelState.IsValid) { cnt = _CatalogService.ModifyRoleCatalogs(vm.RoleId, vm.SelectedCatalogIds); } if (cnt > 0) { TempData["Message"] = string.Format("{0},{1}", "success", "修改成功"); } else { TempData["Message"] = string.Format("{0},{1}", "warning", "修改失敗"); } vm.Catalogs = _CatalogService.FindAll(); return(View("EditCatalog", vm)); }