public void AddEditStationNote(AddEditStationNoteViewModel viewModel) { if (ModelState.IsValid) { CRCDataAccess.SaveStationNote( viewModel.StationNoteId, viewModel.StationId, viewModel.NoteText.Replace("'", ""), (DateTime?)null, (long?)null, CRCUser.UserId ); } }
public ActionResult AddEditStationNote(long?stationNoteId, long stationId, string callLetters) { var viewModel = new AddEditStationNoteViewModel(); if (stationNoteId.HasValue) { var drStationNote = CRCDataAccess.GetStationNote(stationNoteId.Value); drStationNote.MapTo(viewModel); viewModel.NoteText = viewModel.NoteText.Replace("''", "'"); } else { viewModel.StationId = stationId; } viewModel.CallLetters = callLetters; return(PartialView(viewModel)); }