public APIJsonResult MultiDelete(int[] noticeIDs) { var noticeBLL = new TNoticeBLL(); noticeBLL.Delete(noticeIDs); noticeBLL.SaveChanges(); return(Success()); }
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()); }
// 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()); }