Exemplo n.º 1
0
        public APIJsonResult MultiDelete(int[] noticeIDs)
        {
            var noticeBLL = new TNoticeBLL();

            noticeBLL.Delete(noticeIDs);

            noticeBLL.SaveChanges();

            return(Success());
        }
Exemplo n.º 2
0
        public APIJsonResult Edit(NoticeModel noticeModel)
        {
            var noticeBLL = new TNoticeBLL();
            var notice    = new TNotice();

            UtilHelper.CopyProperties(noticeModel, notice);

            AddUpdateInfo(notice);

            noticeBLL.Edit(notice, new string[] { "Title", "Content" });

            noticeBLL.SaveChanges();

            return(Success());
        }
Exemplo n.º 3
0
        // GET api/values/5
        public APIJsonResult Add(NoticeModel noticeModel)
        {
            var noticeBLL = new TNoticeBLL();
            var notice    = new TNotice();

            UtilHelper.CopyProperties(noticeModel, notice);

            AddCreateInfo(notice);

            noticeBLL.Add(notice);

            noticeBLL.SaveChanges();

            return(Success());
        }