Beispiel #1
0
        public JsonResult QueryNodesByIndex(string keySpell)
        {
            Common.Data.JsonData json = new JsonData()
            {
                Result = true
            };
            IAppSettingService   appService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();
            List <CategoryItems> data       = appService.QueryNodes(keySpell);

            json.Data    = data;
            json.Total   = data.Count;
            json.Success = true;
            return(Json(json));
        }
Beispiel #2
0
        public ActionResult AppSettingDialog(int id = 0)
        {
            CategoryItems      item       = new CategoryItems();
            IAppSettingService appService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();

            if (id > 0)
            { //查询带编辑的数据
                item = appService.Get(id);
            }
            ViewData[ParamNameTemplate.AppSettingParentNode] =
                (item.Id > 0 && item.ParentCode != InitAppSetting.DefaultAppsettingRootCode) ?
                appService.QueryNodes(item.ParentCode)
                :QueryAppSettingList(InitAppSetting.DefaultAppsettingRootCode);
            return(View(item));
        }