Beispiel #1
0
        /// <summary>
        /// 添加或者编辑Web API角色
        /// </summary>
        /// <param name="role">Web API角色</param>
        /// <returns>返回添加或保存结果</returns>
        public Response CreateOrUpdate(Role role)
        {
            return this.InvokeService(
                nameof(CreateOrUpdate),
                () =>
                {
                    this.Persistence.Update(NS, "CreateOrUpdate", role);

                    this.ClearCache<Role>();
                },
                role);
        }
Beispiel #2
0
        public ActionResult CreateOrUpdate(Role role)
        {
            var rsp = this.RoleService.CreateOrUpdate(role);

            return rsp.IsSuccess ? CloseDialogWithAlert("保存成功!") : Alert("保存失败,失败原因:" + rsp.GetErrorMessage());
        }