Пример #1
0
        public async Task <IActionResult> AddOrEditModal(AddOrEditWZZModelViewModel modal)
        {
            WZZModel result = new WZZModel()
            {
                Pid = modal.pid
            };

            if (modal.id.HasValue && modal.id != 0)
            {
                result = await _wzz.GetById(modal.id.Value);
            }

            return(PartialView(result));
        }
Пример #2
0
        public async Task <IActionResult> DelModel(AddOrEditWZZModelViewModel model)
        {
            var wzzmode = await _wzz.GetById(model.id.Value);

            if (wzzmode != null)
            {
                //判断是在删除大模块
                if (wzzmode.Pid == null)
                {
                    return(Json(new { code = 2, msg = "操作失败" }));
                }
                List <string> urllist = await _recovery.ClearByModelId(model.id.Value);

                return(Json(new { code = 1, msg = "操作成功", urllist = urllist }));
            }
            return(Json(new { code = 2, msg = "操作失败" }));
        }