public void RemoveEventNote(NoteForEventForm form) { using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA")) { new TableOperations <EventNote>(connection).DeleteRecord(restriction: new RecordRestriction("ID = {0}", form.id)); } }
public void SaveNoteForEvent(NoteForEventForm form) { if (form.note.Trim().Length > 0) { using (AdoDataConnection connection = new AdoDataConnection("dbOpenXDA")) { new TableOperations <EventNote>(connection).AddNewRecord(new EventNote() { EventID = form.id, Note = form.note, UserAccount = form.userId, Timestamp = DateTime.UtcNow }); } } }