예제 #1
0
 private void UpdateNotice(CreateOrUpdateNoticeInput input)
 {
     try {
         Notice model = input.notice.MapTo <Notice>();
         _noticeRespository.Update(model);
         _unitOfWorkManager.Current.SaveChanges();
     } catch (System.Data.Entity.Infrastructure.DbUpdateConcurrencyException ex) {
         throw new UserFriendlyException(L("UpdateByOther"));
     }
 }
예제 #2
0
 public void CreateOrUpdateNotice(CreateOrUpdateNoticeInput input)
 {
     if (!input.notice.Id.HasValue)
     {
         CreateNotice(input);
     }
     else
     {
         UpdateNotice(input);
     }
     _cacheManager.GetCache(_cacheAppName).RemoveAsync(_cacheNoticeListForUser); //清除给用户看的列表缓存
 }
예제 #3
0
        private void CreateNotice(CreateOrUpdateNoticeInput input)
        {
            Notice model = input.notice.MapTo <Notice>();

            _noticeRespository.Insert(model);
        }