Exemple #1
0
        public ActionResult Index()
        {
            var mod = CacheAccess.GetParentModules(_moduleContract, true);

            ViewBag.ModuleF = mod;
            return(View());
        }
Exemple #2
0
        /// <summary>
        /// 载入创建数据
        /// </summary>
        /// <returns></returns>
        public ActionResult Create()
        {
            var mod = CacheAccess.GetParentModules(_moduleContract, false);

            ViewBag.ModuleF = mod;
            int defauModulId = int.Parse(mod[0].Value);

            ViewBag.ModuleT = CacheAccess.GetModules(_moduleContract).Where(c => c.ParentId == defauModulId && c.IsEnabled == true && c.IsDeleted == false).Select(c => new SelectListItem()
            {
                Value = c.Id.ToString(),
                Text  = c.ModuleName
            }).ToList();
            return(PartialView());
        }