/// <summary> /// Approves / revokes the approval of the attachment with ID passed in. /// </summary> /// <param name="attachmentID">The attachment ID.</param> /// <param name="approved">the new flag value for Approved</param> public static void ModifyAttachmentApproval(int attachmentID, bool approved) { // we'll update the approved flag directly in the db, so we don't load the whole attachment into memory. AttachmentEntity updater = new AttachmentEntity(); AttachmentCollection attachments = new AttachmentCollection(); updater.Approved = approved; attachments.UpdateMulti(updater, (AttachmentFields.AttachmentID == attachmentID)); }
/// <summary> /// Approves / revokes the approval of the attachment with ID passed in. /// </summary> /// <param name="attachmentID">The attachment ID.</param> /// <param name="approved">the new flag value for Approved</param> public static void ModifyAttachmentApproval(int attachmentID, bool approved) { // we'll update the approved flag directly in the db, so we don't load the whole attachment into memory. AttachmentEntity updater = new AttachmentEntity(); AttachmentCollection attachments = new AttachmentCollection(); updater.Approved = approved; attachments.UpdateMulti(updater, (AttachmentFields.AttachmentID == attachmentID)); }