public static string GetNotesViewItem(RestCommand command, int noteID) { NotesViewItem notesViewItem = NotesView.GetNotesViewItem(command.LoginUser, noteID); if (notesViewItem.OrganizationID != command.Organization.OrganizationID) { throw new RestException(HttpStatusCode.Unauthorized); } return(notesViewItem.GetXml("NotesViewItem", true)); }
override protected void GetNextRecord() { NotesViewItem note = NotesView.GetNotesViewItem(_loginUser, _itemIDList[_rowIndex]); _lastItemID = note.NoteID; UpdatedItems.Add((int)_lastItemID); DocText = HtmlToText.ConvertHtml(note.Description); _docFields.Clear(); foreach (DataColumn column in note.Collection.Table.Columns) { object value = note.Row[column]; string s = value == null || value == DBNull.Value ? "" : value.ToString(); AddDocField(column.ColumnName, s); } DocFields = _docFields.ToString(); DocIsFile = false; DocName = note.NoteID.ToString(); DocCreatedDate = note.DateCreatedUtc; DocModifiedDate = DateTime.UtcNow; }