コード例 #1
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <returns>是否成功</returns>
        public override void Delete()
        {
            if (!m_Loaded)
            {
                throw new AppException("尚未初始化");
            }
            bool result = (Notice.Delete(NoticeId) == 1);

            //更新缓存
            if (result && CachedEntityCommander.IsTypeRegistered(typeof(NoticeInfo)))
            {
                ResetCache();
            }
            if (!result)
            {
                throw new AppException("删除失败,数据可能被删除");
            }
        }
コード例 #2
0
ファイル: NoticeController.cs プロジェクト: liang24/Vacation
        public JsonResult Delete(string id)
        {
            Notice.Delete("where id in (@0)", id.ToIntList());

            return(Json(ArtDialogResponseResult.SuccessResult));
        }