public bool AddMessageLog(MED_MESSAGE_LOG item) { bool result = dapper.Set <MED_MESSAGE_LOG>().Insert(item); dapper.SaveChanges(); return(result); }
public RequestResult <bool> SendMessage(MED_MESSAGE_LOG item) { bool flag = false; lock (PacuCoordinationService.SerialNoLock) { item.MESSAGE_ID = _pacuCoordinationService.GetCurrentMessageID(); item.SEND_TIME = DateTime.Now; item.RECEIVE_CONFIRM = 0; flag = _pacuCoordinationService.AddMessageLog(item); if (flag) { _pacuCoordinationService.MoveToNextMessageID(); } } return(Success(flag)); }