private void addFirstDownloadLog(User user, int topicId) { AttachmentDownload x = new AttachmentDownload(); x.UserId = user.Id; x.TopicId = topicId; x.insert(); }
public static string GetAttachmentDownload(RestCommand command, int attachmentDownloadID) { AttachmentDownload attachmentDownload = AttachmentDownloads.GetAttachmentDownload(command.LoginUser, attachmentDownloadID); if (attachmentDownload.OrganizationID != command.Organization.OrganizationID) { throw new RestException(HttpStatusCode.Unauthorized); } return(attachmentDownload.GetXml("AttachmentDownload", true)); }
private void addFirstDownloadLog( User user, int topicId ) { AttachmentDownload x = new AttachmentDownload(); x.UserId = user.Id; x.TopicId = topicId; x.insert(); }
private Boolean isFirstDownload(User user, int topicId) { AttachmentDownload x = AttachmentDownload.find("UserId=" + user.Id + " and TopicId=" + topicId).first(); return(x == null); }