Exemple #1
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        public async Task <IActionResult> Create()
        {
            var data = await ModuleApp.GetMenuCatalogListAsync();

            var selectList = data.Select(o => new SelectModel {
                Id = o.Id, Text = o.FullName
            }).ToList();

            ViewData["ParentIdSelect"] = SelectModel.ToJson(selectList);
            return(View());
        }
Exemple #2
0
        public async Task <IActionResult> Details(long Id)
        {
            var module = await ModuleApp.GetAsync(Id);

            if (module == null)
            {
                return(NotFind());
            }
            ViewData["Model"] = JsonHelper.SerializeObject(module, false, true);
            var data = await ModuleApp.GetMenuCatalogListAsync();

            var selectList = data.OrderBy(o => o.SortCode).Select(o => new SelectModel {
                Id = o.Id, Text = o.FullName
            }).ToList();

            ViewData["ParentIdSelect"] = SelectModel.ToJson(selectList);
            return(View());
        }