コード例 #1
0
        public ActionResult Add(Base_Right model)
        {
            ResultView <string> view = new ResultView <string>();

            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            Result <int> result = new Result <int>();

            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddRight(model);
            }
            return(Json(result.ToResultView()));
        }
コード例 #2
0
        public ActionResult Add(Base_Right model)
        {
            ResultView <string> view = new ResultView <string>();

            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            //权限检查
            Helper.IsCheck(HttpContext, model.Belong + "Right", SystemRight.Add.ToString(), true);

            Result <int> result = new Result <int>();

            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddRight(model);
            }
            return(Json(result.ToResultView()));
        }