clsImportSupportIssueAttachment Class |
Use MPInterface.bImportSupportIssueAttachment(clsImportSupportIssueAttachment, clsImportBaseeImportMode) to import.
Namespace: MARIInterface
The clsImportSupportIssueAttachment type exposes the following members.
| Name | Description | |
|---|---|---|
| clsImportSupportIssueAttachment | Initializes a new instance of the clsImportSupportIssueAttachment class |
| Name | Description | |
|---|---|---|
| AttachmentID |
Unique AttachmentID to the support ticket (task, idea, development task, HRTask)
| |
| AttachmentSubject | Short text describing the content of the attachment | |
| AttachmentTyp |
Typ of the Attachment, See clsImportSupportIssueAttachmenteAttachmentTyp.
| |
| Comment |
NText Text of the attachment
| |
| DisableNotificationSettings |
Wenn true, Create and update will not send notification emails based on the settings. It will silence the mechanism
| |
| Documentlink |
nvarchar(250) Link to a Document
| |
| Internal |
Flag if this attachment is only visible for internal support personel.
| |
| IssueID |
Reference for the support ticket (task, idea, development task, HRTask)
| |
| MimeType |
Please use the W3C mime types to give us the type of document
| |
| OrgFilename |
Name or the source file (now stored as Byte-Array in DocumentData).
|
| Name | Description | |
|---|---|---|
| bChange | ||
| bDelete | ||
| bReadFromDB |
Reads the item data from the database and copies the values to the class
(Overrides clsImportBasebReadFromDB(MPInterface, String).) |
| Name | Description | |
|---|---|---|
| DocumentData |
Binary data of the document (PDF, Image). The content will be stored in to MPBilder or MPDokumente.
|
private clsImportSupportIssueAttachment CreateAttachmentRemark(int lTicketID, string sComment) { clsImportSupportIssueAttachment oAttachment = new clsImportSupportIssueAttachment(); oAttachment.IssueID = lTicketID; //Madatory reference to an existing ticket oAttachment.AttachmentTyp = clsImportSupportIssueAttachment.eAttachmentTyp.Comment; oAttachment.Comment = sComment; if (oMPInterface.bImportSupportIssueAttachment(oAttachment, clsImportBase.eImportMode.ValidateAndImport)) { return oAttachment; //will return the ticket (header) with all properties } else { LogFail($"CreateAttachmentRemark: {oMPInterface.oErrors.PrintErrors()}"); return null; } } private clsImportSupportIssueAttachment CreateAttachmentFileByPath(int lTicketID, string sXmlFileSamplePath) { clsImportSupportIssueAttachment oAttachment = new clsImportSupportIssueAttachment(); oAttachment.IssueID = lTicketID; //Madatory reference to an existing ticket oAttachment.AttachmentTyp = clsImportSupportIssueAttachment.eAttachmentTyp.Document; oAttachment.OrgFilename = sXmlFileSamplePath; oAttachment.MimeType = "text/xml"; //Read bytes from file string sFileData = System.IO.File.ReadAllText(sXmlFileSamplePath); oAttachment.DocumentData = Encoding.UTF8.GetBytes(sFileData); if (oMPInterface.bImportSupportIssueAttachment(oAttachment, clsImportBase.eImportMode.ValidateAndImport)) { return oAttachment; //will return the ticket (header) with all properties } else { LogFail($"CreateAttachmentFileByPath: {oMPInterface.oErrors.PrintErrors()}"); return null; } }