Click or drag to resize

clsImportSupportIssueAttachment Class

Data holder to import additional attachments, notes to an existing support ticket into the MARIProject database.

Use MPInterface.bImportSupportIssueAttachment(clsImportSupportIssueAttachment, clsImportBaseeImportMode) to import.

Inheritance Hierarchy
SystemObject
  MARIInterfaceclsImportBase
    MARIInterfaceclsImportSupportIssueAttachment

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.0.0.100
Syntax
public class clsImportSupportIssueAttachment : clsImportBase

The clsImportSupportIssueAttachment type exposes the following members.

Constructors
  NameDescription
Public methodclsImportSupportIssueAttachment
Initializes a new instance of the clsImportSupportIssueAttachment class
Top
Properties
  NameDescription
Public propertyAttachmentID
Unique AttachmentID to the support ticket (task, idea, development task, HRTask)
Public propertyAttachmentSubject
Short text describing the content of the attachment
Public propertyAttachmentTyp
Public propertyComment
NText Text of the attachment
Public propertyDisableNotificationSettings
Wenn true, Create and update will not send notification emails based on the settings. It will silence the mechanism
Public propertyDocumentlink
nvarchar(250) Link to a Document
Public propertyInternal
Flag if this attachment is only visible for internal support personel.
Public propertyIssueID
Reference for the support ticket (task, idea, development task, HRTask)
Public propertyMimeType
Please use the W3C mime types to give us the type of document
Public propertyOrgFilename
Name or the source file (now stored as Byte-Array in DocumentData).
Top
Methods
  NameDescription
Public methodbChange
Public methodbDelete
Public methodbReadFromDB
Reads the item data from the database and copies the values to the class
(Overrides clsImportBasebReadFromDB(MPInterface, String).)
Top
Fields
  NameDescription
Public fieldDocumentData
Binary data of the document (PDF, Image). The content will be stored in to MPBilder or MPDokumente.
Top
Remarks

View: MARISupportIssueLine: :Table: MPHotlineAnfrageAnhang

ClassNameChanged in V5.0 from clsImportIssueAttachment to clsImportSupportIssueAttachment.
Examples
Add attachments to a ticket via MARIInterface
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;
    }
}
See Also