private void SaveNotes(string note, long callId) { var callCenterNotes = new CallCenterNotes(); callCenterNotes.CallId = callId; callCenterNotes.Notes = note; callCenterNotes.IsActive = true; callCenterNotes.NotesSequence = 1; _callCenterNotesRepository.Save(callCenterNotes); }
private void SaveNotes(string note, long callId) { var callCenterNotes = new CallCenterNotes { CallId = callId, Notes = note, IsActive = true, NotesSequence = 1 }; _callCenterNotesRepository.Save(callCenterNotes); }
public CallCenterNotes Save(CallCenterNotes call) { if (call.CallId <= 0) { return(null); } var inDbCallCenterNotes = GetByCallId(call.CallId); if (inDbCallCenterNotes != null) { call.NotesSequence = inDbCallCenterNotes.NotesSequence + 1; } call.DateCreated = DateTime.Now; using (var adapter = PersistenceLayer.GetDataAccessAdapter()) { var entity = Mapper.Map <CallCenterNotes, CallCenterNotesEntity>(call); adapter.SaveEntity(entity, true); return(Mapper.Map <CallCenterNotesEntity, CallCenterNotes>(entity)); } }