public ActionResult CreateOrUpdate(Button button) { button.Initialize(); var rsp = this.ButtonService.CreateOrUpdate(button); return rsp.IsSuccess ? this.CloseDialogWithAlert("保存成功!") : this.Alert("保存失败,失败原因:" + rsp.ErrorMessage, AlertType.Error); }
/// <summary> /// 新增或更新按钮信息。 /// </summary> /// <param name="button">按钮信息</param> /// <returns>执行结果</returns> public Response CreateOrUpdate(Button button) { return this.InvokeService( nameof(CreateOrUpdate), () => { this.Persistence.Update(ButtonNamespace, "CreateOrUpdate", button); this.ClearCache<Button>(); this.ClearCache<SystemMenu>(); }, button); }