Ejemplo n.º 1
0
        public async Task <ActionResult <ApiResult> > Update(ActionGroup actionGroup)
        {
            await _ActionGroupService.Update(actionGroup);

            ApiResult resp = new ApiResult();

            resp.code = Code.Success;
            return(resp);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 实现对菜单组的修改工作
        /// </summary>
        /// <param name="actionGroup"></param>
        /// <returns></returns>
        public ActionResult UpdateActionGroup(ActionGroup actionGroup)
        {
            //首先查询出所有的actionInfo的单个信息根据ID
            var editorActionInfo = _actiongroupService.Get(c => c.ID == actionGroup.ID).FirstOrDefault();

            //获取要删除的数据
            editorActionInfo.GroupName = actionGroup.GroupName;
            editorActionInfo.GroupType = actionGroup.GroupType;

            var result = _actiongroupService.Update(editorActionInfo);

            if (result.Code == ResultEnum.Success && result.Data > 0)
            {
                return(Content("OK"));
            }
            return(Content(result.Msg));
        }