public AttachmentProxy GetProxy() { AttachmentProxy result = AttachmentProxy.ClassFactory(this.RefType); result.FilePathID = this.FilePathID; result.SentToSnow = this.SentToSnow; result.SentToTFS = this.SentToTFS; result.ProductFamilyID = this.ProductFamilyID; result.SentToJira = this.SentToJira; result.RefID = this.RefID; //result.RefType = this.RefType; result.ModifierID = this.ModifierID; result.CreatorID = this.CreatorID; result.Description = this.Description; result.Path = this.Path; result.FileSize = this.FileSize; result.FileType = this.FileType; result.FileName = this.FileName; result.OrganizationID = this.OrganizationID; result.AttachmentID = this.AttachmentID; result.CreatorName = this.CreatorName; result.DateCreated = DateTime.SpecifyKind(this.DateCreatedUtc, DateTimeKind.Utc); result.DateModified = DateTime.SpecifyKind(this.DateModifiedUtc, DateTimeKind.Utc); return(result); }
public static void CreateActionAttachment(AttachmentProxy attachmentProxy) { Attachment attachment = (new Attachments(new LoginUser(attachmentProxy.CreatorID, attachmentProxy.OrganizationID))).AddNewAttachment(); attachment.RefType = AttachmentProxy.References.Actions; attachment.RefID = ((ActionAttachmentProxy)attachmentProxy).ActionID; attachment.OrganizationID = attachmentProxy.OrganizationID; attachment.FileName = attachmentProxy.FileName; attachment.Path = attachmentProxy.Path; attachment.FileType = attachmentProxy.FileType; attachment.FileSize = attachmentProxy.FileSize; attachment.FilePathID = 3; // ActionModel.ActionPathIndex attachment.Description = attachmentProxy.Description; attachment.ProductFamilyID = attachmentProxy.ProductFamilyID; attachment.Collection.Save(); }