예제 #1
0
        public OptResult Update(PermVM vmEditPer)
        {
            OptResult rst = null;

            //
            var token = base.ParseToken(ActionContext);

            var per = OOMapper.Map <PermVM, Permission>(vmEditPer);

            rst = _perSrv.Update(per);

            return(rst);
        }
예제 #2
0
        public OptResult Add(PermVM vmAddPer)
        {
            OptResult rst = null;

            if (vmAddPer == null)
            {
                rst = OptResult.Build(ResultCode.ParamError, "参数不能为空");
                return(rst);
            }

            //
            var token = base.ParseToken(ActionContext);
            var per   = OOMapper.Map <PermVM, Permission>(vmAddPer);

            rst = _perSrv.Add(per);

            return(rst);
        }