public void AddNotifyResponse(CommunicationObject notifyInfo, string fullResponse, string responseXml) { try { NoticeResponseEntity entity = new NoticeResponseEntity(); entity.NoticeId = notifyInfo.Id; entity.NoticeVersion = notifyInfo.Version; entity.MessengerId = notifyInfo.MessengerId; entity.Timestamp = notifyInfo.Timestamp; entity.TranType = (int)notifyInfo.TransactionType; entity.FullResponseText = fullResponse; entity.ResponseXml = responseXml; NoticeManager noticeManager = new NoticeManager(DbAccess); noticeManager.AddNoticeResponse(entity); } catch (Exception ex) { string errMsg = "添加响应到数据库失败!" + responseXml; throw HandleException(LogCategory.Notice, errMsg, ex); } }
public void AddNoticeResponse(NoticeResponseEntity entity) { entity.ResponseTime = DateTime.Now; persistence.Add(entity); }