Exemple #1
0
        public JsonResult SaveRole(AuditRoleDetail detail)
        {
            var result = new BaseResponse()
            {
                DoFlag = false
            };
            var    flag    = false;
            string message = "";

            if (detail.SysNo.HasValue)
            {
                //修改
                flag = BaseCouponConfigClient.Instance.UpdateRole(detail, out message);
            }
            else
            {
                //添加
                flag = BaseCouponConfigClient.Instance.AddRole(detail, out message);
            }
            if (flag)
            {
                result.DoResult = "操作成功";
                result.DoFlag   = true;
            }
            else
            {
                result.DoResult = message;
            }
            return(Json(result));
        }
Exemple #2
0
        public ActionResult EditRole(int?sysNo)
        {
            ViewBag.Title = "添加角色信息";
            var detail = new AuditRoleDetail();

            if (sysNo.HasValue)
            {
                var result = BaseCouponConfigClient.Instance.QueryRole(sysNo);
                if (result != null && result.Any())
                {
                    detail        = result.First();
                    ViewBag.Title = "编辑角色信息";
                }
            }
            return(View(detail));
        }