Beispiel #1
0
        private void addFirstDownloadLog(User user, int topicId)
        {
            AttachmentDownload x = new AttachmentDownload();

            x.UserId  = user.Id;
            x.TopicId = topicId;
            x.insert();
        }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 private void addFirstDownloadLog( User user, int topicId )
 {
     AttachmentDownload x = new AttachmentDownload();
     x.UserId = user.Id;
     x.TopicId = topicId;
     x.insert();
 }
Beispiel #4
0
        private Boolean isFirstDownload(User user, int topicId)
        {
            AttachmentDownload x = AttachmentDownload.find("UserId=" + user.Id + " and TopicId=" + topicId).first();

            return(x == null);
        }