Exemplo n.º 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));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 加载面包屑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <IActionResult> Breadcrumb(int id)
        {
            var result = await _WZZModelBLL.GetById(id);

            return(Json(result, new JsonSerializerSettings()
            {
                ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore
            }));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 根据id获取模块信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <IActionResult> GetModelInfo(int id)
        {
            var result = await _wzzbll.GetById(id);

            return(Json(result.name));
        }