Esempio n. 1
0
        public ActionResult CreateOrUpdate(HomeShortcut homeShortcut)
        {
            homeShortcut.UserId = WebHelper.GetLogOnUserId();

            var rsp = this.HomeShortcutService.CreateOrUpdate(homeShortcut);

            return rsp.IsSuccess ? this.CloseDialogWithAlert("保存成功!") : this.Alert("保存失败,失败原因:" + rsp.ErrorMessage, AlertType.Error);
        }
Esempio n. 2
0
        /// <summary>
        /// 添加首页快捷方式信息。
        /// </summary>
        /// <param name="homeShortcut">首页快捷方式信息</param>
        /// <returns>操作结果</returns>
        public Response CreateOrUpdate(HomeShortcut homeShortcut)
        {
            return this.InvokeService(
                nameof(CreateOrUpdate),
                () =>
                {
                    this.Persistence.Create(HomeShortcutNamespace, "CreateOrUpdate", homeShortcut);

                    this.ClearCache<HomeShortcut>();
                }, homeShortcut);
        }